isupper、_isupper_l、iswupper、_iswupper_l
确定整数是否表示大写字母。
int isupper(
int c
);
int _isupper_l (
int c,
_locale_t locale
);
int iswupper(
wint_t c
);
int _iwsupper_l(
wint_t c,
_locale_t locale
);
参数
c
要测试的整数。locale
要使用的区域设置。
返回值
如果 c 是大写字母的特定表示,其中每个实例返回非零。 如果 c 是一个大写字母 (A-Z),isupper 返回一个非零值。 如果 c 是对应于一个大写字母的宽字符,或者,如果 c 是宽字符的现实定义集,其中iswcntrl、iswdigit、iswpunct或 iswspace 都是非零,则iswupper 返回一个非零值。 如果 c 不满足测试条件,则每个实例都返回 0。
这些带有 _l 后缀的函数的版本使用传递的区域设置,而不是与区域设置行为相关的当前区域设置。 有关详细信息,请参阅区域设置。
如果c不是 EOF 或在范围 0 到 0xFF 中(包含 0 和 0xFF),isupper 和 _isupper_l 的行为是未定义的。 如果使用的是调试 CRT 库且 c 不是这些值之一,函数就会引发断言。
一般文本例程映射
TCHAR.H 例程 |
未定义 _UNICODE & _MBCS |
已定义 _MBCS |
已定义 _UNICODE |
---|---|---|---|
_istupper |
isupper |
iswupper |
|
_istupper_l |
_isupper_l |
_iswupper_l |
要求
例程 |
必需的标头 |
---|---|
isupper |
<ctype.h> |
_isupper_l |
<ctype.h> |
iswupper |
<ctype.h> 或 <wchar.h> |
_iswupper_l |
<ctype.h> |
有关其他兼容性信息,请参见兼容性。