C ++ iswlower () - Libreria standard C ++

La funzione iswlower () in C ++ controlla se il carattere wide specificato è un carattere minuscolo o meno.

La funzione iswlower () è definita nel file di intestazione.

prototipo iswlower ()

 int iswlower (wint_t ch);

La funzione iswlower () controlla se ch è un carattere minuscolo, ovvero uno dei seguenti

 a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z.

Parametri iswlower ()

  • ch: il carattere largo da controllare.

iswlower () Restituisce il valore

  • La funzione iswlower () restituisce un valore diverso da zero se ch è un carattere minuscolo.
  • Restituisce zero se ch non è un carattere minuscolo.

Esempio: come funziona la funzione iswlower ()?

 #include #include #include using namespace std; int main() ( setlocale(LC_ALL, "en_US.UTF-8"); wchar_t ch1 = L'u03a0'; wchar_t ch2 = L'u03c0'; wcout << L"islower(" << ch1 << ") returned " << boolalpha << (bool)iswlower(ch1) << endl; wcout << L"islower(" << ch2 << ") returned " << boolalpha << (bool)iswlower(ch2) << endl; return 0; )

Quando esegui il programma, l'output sarà:

 islower (Π) ha restituito falso islower (π) ha restituito true

Articoli interessanti...