作为属性传递的字符串 | 说明 | 等效函数 |
"tolower" | 转小写 | towlower |
"toupper" | 转大写 | towupper |
/* wctrans example */ #include <stdio.h> #include <wctype.h> int main () { int i=0; wchar_t str[] = L"Test String.\n"; wchar_t c; wctype_t check = wctype("lower"); wctrans_t trans = wctrans("toupper"); while (str[i]) { c = str[i]; if (iswctype(c,check)) c = towctrans(c,trans); putwchar (c); i++; } return 0; } |
towctrans | 使用转换设置转换(function ) |
wctype | 返回宽字符类型属性(function ) |
iswupper | 检查宽字符是否为大写字母(function ) |
iswlower | 检查宽字符是否为小写字母(function ) |