Share via


_mbctohira, _mbctohira_l, _mbctokata, _mbctokata_l

轉換平假名和片假名字元。

重要

這個 API 不能用於在 Windows 執行階段中執行的應用程式。 如需詳細資訊,請參閱 CRT functions not supported in Universal Windows Platform apps (通用 Windows 平台應用程式中不支援的 CRT 函式)。

語法

unsigned int _mbctohira(
   unsigned int c
);
unsigned int _mbctohira_l(
   unsigned int c,
   _locale_t locale
);
unsigned int _mbctokata(
   unsigned int c
);
unsigned int _mbctokata_l(
   unsigned int c,
   _locale_t locale
);

參數

c
要轉換的多位元組字元。

locale
要使用的地區設定。

傳回值

如果可能,所有這些函式都會傳回已轉換的字元 c。 否則會傳回未變更的字元 c

備註

_mbctohira_mbctokata 函式會測試字元 c,如果可能的話,還會套用下列其中一個轉換。

常式 轉換
_mbctohira, _mbctohira_l 多位元組片假名到多位元組平假名。
_mbctokata, _mbctokata_l 多位元組平假名到多位元組片假名。

輸出值會受到 LC_CTYPE 地區設定之類別設定的影響。 如需詳細資訊,請參閱setlocale。 這些函式的版本均相同,除了沒有 _l 後置碼的函式會針對此地區設定的相關行為使用目前的地區設定,而具有 _l 後置詞的函式會改用傳入的地區設定參數。 如需詳細資訊,請參閱 Locale

在舊版中,_mbctohira 名為 jtohira,而 _mbctokata 名為 jtokata。 對於新的程式碼,請使用新名稱。

根據預設,此函式的全域狀態會限定于應用程式。 若要變更此行為,請參閱 CRT 中的全域狀態。

需求

常式 必要的標頭
_mbctohira <mbstring.h>
_mbctohira_l <mbstring.h>
_mbctokata <mbstring.h>
_mbctokata_l <mbstring.h>

如需相容性詳細資訊,請參閱相容性

另請參閱

資料轉換
_mbcjistojms, _mbcjistojms_l, _mbcjmstojis, _mbcjmstojis_l
_mbctolower, _mbctolower_l, _mbctoupper, _mbctoupper_l
_mbctombb, _mbctombb_l