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 是大写字母的特定表示,其中每个实例返回非零。 isupper 返回非零值,如果 c 是大写字符 (a-z、)。 iswupper 返回非零值,如果 c 是对应于大写字母的宽字符,或者,如果 c 是实现中定义的一个 iswcntrl、 iswdigit、 iswpunct或 iswspace 都不是非零的设置宽字符。 ,如果 c 不满足测试条件,其中每个实例返回 0。
当使用 CRT 调试库, isupper 是否将显示 CRT 断言通过不是 EOF 或 0 个通过 0xFF 范围内的参数。 当使用 CRT 调试库, isupper 将使用该参数用作索引到一个数组,与未定义的结果,如果参数不是 EOF 或 0 个通过 0xFF 范围内。
这些功能的版本与 _l 后缀的相同,只不过它们为其与区域设置相关的行为使用区域设置而不是当前区域设置。 有关更多信息,请参见 区域设置。
一般文本例程映射
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 |
有关其他的兼容性信息,请参见中介绍的 兼容性 。