C ++ iswlower () - C ++ standaardbibliotheek

De functie iswlower () in C ++ controleert of het opgegeven brede teken een kleine letter is of niet.

De functie iswlower () is gedefinieerd in het header-bestand.

iswlower () prototype

 int iswlower (wint_t ch);

De functie iswlower () controleert of ch een kleine letter is, dwz een van de volgende

 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.

iswlower () Parameters

  • ch: het brede teken dat moet worden gecontroleerd.

iswlower () Retourwaarde

  • De functie iswlower () retourneert een waarde die niet nul is als ch een kleine letter is.
  • Het geeft nul terug als ch geen kleine letter is.

Voorbeeld: hoe werkt de functie 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; )

Wanneer u het programma uitvoert, is de uitvoer:

 islower (Π) gaf false islower (π) retourneerde true

Interessante artikelen...