iswlower() 函数在 C/C++ 中


iswlower() 函数是 C/C++ 中的一个内置函数。它检查宽字符是否为小写。它在 C++ 语言中声明为 “cwctype” 头文件,而在 C 语言中声明为 “ctype.h”。它接受单个字符,称为宽字符。如果字符不是小写字符,它将返回零 (0)。如果字符是小写,它将返回非零值。

以下是 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

更新于:24-6 月-2020

167 次观看

开启你的 事业

完成课程获得认证

开始使用
广告
© . All rights reserved.