iswupper()
is a built-in function defined in the <wctype>
header in C.
The function checks whether or not the given wide character is an uppercase letter. This check is specific to the current locale being used.
The function prototype:
int iswupper(std::wint_t ch);
iswupper()
returns non-zero if the input wide character is in uppercase. Otherwise, the function returns zero.
A wide character has a size greater than the traditional 8-bit character.
A wide string literal is prefixed by L
.
/* iswlower example */#include <stdio.h>#include <stddef.h>#include <wctype.h>int main (){int i=0;//wide string literal -- all UPPERCASEwchar_t str[] = L"HeLlO WoRlD!";//wide char for inputwchar_t c;//loop to iterate over each char in strwhile (str[i]){c = str[i];if (iswupper(c))printf("%c --> UPPERCASE\n", c);elseprintf("%c --> not uppercase\n", c);i++;}return 0;}
Free Resources