toupper, _toupper, towupper, _toupper_l, _towupper_l
为大写将字符。
int toupper(
int c
);
int _toupper(
int c
);
int towupper(
wint_t c
);
int _toupper_l(
int c ,
_locale_t locale
);
int _towupper_l(
wint_t c ,
_locale_t locale
);
参数
c
转换的字符。locale
使用的区域设置。
返回值
其中每个实例转换 c的副本,如果可能,并返回结果。
如果 c 是 iswlower 是非零的宽字符,并具有 iswupper 不为零, towupper 返回相应的宽字符字符串中的相应宽字符;否则, towupper 未更改的返回 c 。
不返回保留值指示错误。
为了 toupper 可以为预期结果, __isascii 和 islower 必须同时返回非零。
备注
这些实例尽可能中的每个转换特定小写字母转换为大写字母并且适当。 towupper 大小写转换特定于区域设置。 与当前区域设置相关仅更改字符,以防。 不 _l后缀的函数使用当前设置的区域设置。 这些功能的版本与 _l后缀的将区域设置作为参数并使用该而不是当前设置的区域设置。 有关更多信息,请参见 区域设置。
为了 toupper 可以为预期结果, __isascii 和 isupper 必须同时返回非零。
一般文本例程映射
TCHAR.H 实例 |
未定义的 _UNICODE _MBCS |
定义的 _MBCS |
定义的 _UNICODE |
---|---|---|---|
_totupper |
toupper |
_mbctoupper |
towupper |
_totupper_l |
_toupper_l |
_mbctoupper_l |
_towupper_l |
备注
_toupper_l 和 _towupper_l 没有区域设置依赖项和不应该直接调用。它们提供内部使用。 _totupper_l。
要求
实例 |
必需的头 |
---|---|
toupper |
ctype.h |
_toupper |
ctype.h |
towupper |
ctype.h 或 wchar.h |
有关其他的兼容性信息,请参见中介绍的 兼容性 。
示例
在参见 为函数的示例。