_ismbclower、_ismbclower_l、_ismbcupper、_ismbcupper_l
检查多字节字符是否是小写或大写。
重要
此 API 不能用于在 Windows 运行时中执行的应用程序。有关详细信息,请参见 CRT functions not supported with /ZW(CRT 函数不支持使用/ZW)。
int _ismbclower(
unsigned int c
);
int _ismbclower_l(
unsigned int c,
_locale_t locale
);
int _ismbcupper(
unsigned int c
);
int _ismbcupper_l(
unsigned int c,
_locale_t locale
);
参数
c
要测试的字符。locale
要使用的区域设置。
返回值
其中每个例程在字符满足测试条件时返回一个非零值,在不满足测试条件时回 0。 如果c<= 255,且存在相应的 _ismbb实例 (例如,_ismbcalnum对应于_ismbbalnum),则结果是相应的_ismbb实例的返回值。
备注
其中每个函数都针对给定的条件测试给定的多字节字符。
这些带有 _l 后缀的函数的版本相同,只不过它们使用传递区域设置而不是其与区域设置相关的行为的当前区域设置。 有关详细信息,请参阅区域设置。
例程 |
测试条件 |
代码页 932 示例 |
---|---|---|
_ismbclower |
小写字母 |
返回非零,且只有c 是 ASCII 字母小写英语的单字节表示:0x61=<c<=0x7A。 |
_ismbclower_l |
小写字母 |
返回非零,且只有c 是 ASCII 字母小写英语的单字节表示:0x61=<c<=0x7A。 |
_ismbcupper |
大写字母 |
返回非零,且只有c 是 ASCII 字母大写英语的单字节表示:0x41=<c<=0x5A。 |
_ismbcupper_l |
大写字母 |
返回非零,且只有c 是 ASCII 字母大写英语的单字节表示:0x41=<c<=0x5A。 |
要求
例程 |
必需的标头 |
---|---|
_ismbclower |
<mbstring.h> |
_ismbclower_l |
<mbstring.h> |
_ismbcupper |
<mbstring.h> |
_ismbcupper_l |
<mbstring.h> |
有关兼容性的更多信息,请参见兼容性。