function
<cwctype>
iswlower
Check if wide character is lowercase letter
Checks whether c is a lowercase letter.
Notice that what is considered a letter may depend on the locale being used.
This function is the wide-character equivalent of islower (<cctype>): If c translates with wctob to a character for which islower is true, it is always considered a lowercase letter character by this function too.
In C++, a locale-specific template version of this function (islower) exists in header <locale> for all character types.
Parameters
- c
- Wide character to be checked, casted to a wint_t, or WEOF.
wint_t is an integral type.
Return Value
A value different from zero (i.e., true) if indeed c is a lowercase letter. Zero (i.e., false) otherwise.
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
/* iswlower example */
#include <stdio.h>
#include <wctype.h>
int main ()
{
int i=0;
wchar_t str[] = L"Test String.\n";
wchar_t c;
while (str[i])
{
c = str[i];
if (iswlower(c)) c=towupper(c);
putwchar (c);
i++;
}
return 0;
}
|
Output:
See also
- islower
- Check if character is lowercase letter (function)
- iswupper
- Check if wide character is uppercase letter (function)
- iswalpha
- Check if wide character is alphabetic (function)
- towupper
- Convert lowercase wide character to uppercase (function)
- towlower
- Convert uppercase wide character to lowercase (function)
- islower (locale)
- Check if character is a lowercase letter using locale (function template)