C / C ++中的iswlower()函数
该函数iswlower()是C/C++中的内置函数。它检查宽字符是否为小写。在C++语言中的“cwctype”头文件中声明,而在C语言中的“ctype.h”中声明。它采用单个字符,称为宽字符。如果该字符不是小写字符,它将返回零。如果字符为小写,它将返回非零值。
这是iswlower()C/C++语言的语法,
int iswlower(ch);
这是iswlower()C++语言的示例,
示例
#include <cwctype>
#include <iostream>
using namespace std;
int main() {
wchar_t c = 'S';
if (iswlower(c))
wcout << c << ", The character is a lowercase character ";
else
wcout << c << ", The character is not a lowercase character ";
wcout << endl;
return 0;
}输出结果
S , The character is not a lowercase character