Namespaces
Variants
Actions

std::iswlower

From cppreference.com
< cpp‎ | string‎ | wide
 
 
 
 
Defined in header <cwctype>
int iswlower( std::wint_t ch );

Checks if the given wide character is a lowercase letter, i.e. one of abcdefghijklmnopqrstuvwxyz or any lowercase letter specific to the current locale.

If the value of ch is neither representable as a wchar_t nor equal to the value of the macro WEOF, the behavior is undefined.

Contents

[edit] Parameters

ch - wide character

[edit] Return value

Non-zero value if the wide character is a lowercase letter, zero otherwise.

[edit] Notes

ISO 30112 specifies which Unicode characters are include in POSIX lower category.

[edit] Example

#include <clocale>
#include <cwctype>
#include <iostream>
 
int main()
{
    wchar_t c = L'\u0444'; // Cyrillic small letter ef ('ф')
 
    std::cout << std::hex << std::showbase << std::boolalpha
              << "in the default locale, iswlower("
              << static_cast<std::wint_t>(c) << ") = "
              << static_cast<bool>(std::iswlower(c)) << '\n';
 
    std::setlocale(LC_ALL, "en_US.utf8");
    std::cout << "in Unicode locale, iswlower("
              << static_cast<std::wint_t>(c) << ") = "
              << static_cast<bool>(std::iswlower(c)) << '\n';
}

Output:

in the default locale, iswlower(0x444) = false
in Unicode locale, iswlower(0x444) = true

[edit] See also

checks if a character is classified as lowercase by a locale
(function template) [edit]
checks if a character is lowercase
(function) [edit]
C documentation for iswlower
ASCII values characters

iscntrl
iswcntrl