C examples for wctype.h:iswalpha
function
<cwctype> <wctype.h>
Check if wide character is alphabetic
int iswalpha (wint_t c);
Parameter | Description |
---|---|
c | Wide character to be checked |
A non zero value (i.e., true) if c is an alphabetic letter. Zero (i.e., false) otherwise.
#include <stdio.h> #include <wctype.h> int main ()/* w ww. ja v a 2s .c o m*/ { int i=0; wchar_t str[] = L"C++ test 1234"; while (str[i]) { if (iswalpha(str[i])) wprintf (L"character %lc is alphabetic\n",str[i]); else wprintf (L"character %lc is not alphabetic\n",str[i]); i++; } return 0; }