towlower
函数 <cwctype>
wint_t towlower ( wint_t c );
将大写宽字符转换为小写
如果c是一个大写字母并具有一个小写等价项,则将c转换为其小写等价项。
如果不可能进行这样的转换,则返回值为不变的c。
请注意,哪些被视为字母可能取决于所使用的区域设置。
如果一个大写字符有多个对应的小写字符,这个函数总是返回相同的字符,对应于c的相同值。
这个函数相当于
tolower
(<
cctype>)。
在c++中,对于所有字符类型,该函数的特定于区域的模板版本(tolower)在头文件<locale>中。
☲ 参数
c
要转换的宽字符,转换为wint_t或
WEOF。
wint_t是整型。
☉ 返回值
等于c(如果存在)的小写字母,否则等于c(不变)。Wint_t是整型。
☣ 示例
/* towlower example */
#include <stdio.h>
#include <wctype.h>
int main ()
{
int i=0;
wchar_t str[] = L"Test String.\n";
wchar_t c;
while (str[i])
{
c = str[i];
putwchar (towlower(c));
i++;
}
return 0;
}
|
输出:
test string.
🍄 另请参阅
tolower |
将大写字母转换为小写字母(function ) |
towupper |
将小写宽字符转换为大写(function ) |
iswupper |
检查宽字符是否为大写字母(function ) |
iswlower |
检查宽字符是否为小写字母(function ) |
iswalpha |
检查宽字符是否为字母(function ) |
tolower(locale) |
使用区域设置将大写字母转换为小写字母(function template ) |