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.