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
廣告
資料結構
網路
RDBMS
作業系統
Java
iOS
HTML
CSS
Android
Python
C 程式設計
C++
C#
MongoDB
MySQL
Javascript
PHP