C ++ iswlower () - Bibliothèque standard C ++

La fonction iswlower () en C ++ vérifie si le caractère large donné est un caractère minuscule ou non.

La fonction iswlower () est définie dans le fichier d'en-tête.

prototype iswlower ()

 int iswlower (wint_t ch);

La fonction iswlower () vérifie si ch est un caractère minuscule, c'est-à-dire l'un des suivants

 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.

Paramètres iswlower ()

  • ch: Le caractère large à vérifier.

iswlower () Valeur de retour

  • La fonction iswlower () renvoie une valeur non nulle si ch est un caractère minuscule.
  • Il renvoie zéro si ch n'est pas un caractère minuscule.

Exemple: comment fonctionne la fonction 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; )

Lorsque vous exécutez le programme, la sortie sera:

 islower (Π) a renvoyé false islower (π) a renvoyé true

Articles intéressants...