Use iswalpha function check if a wide character is a letter
Syntax
C iswalpha function has the following syntax.
iswalpha(wint_t ch)
Header
C iswalpha function is from header file wctype.h.
Description
C iswalpha function returns nonzero if wide
character ch
is a letter or zero if not.
Example
Use C iswalpha function to tell if it is a wide character a letter.
#include <stdio.h>
#include <wctype.h>
/*from w w w . j a va 2 s . c om*/
int main(void)
{
int wc;
for (wc=0; wc <= 0xFF; wc++) {
printf("%3d", wc);
printf(" %#4x ", wc);
printf("%2s", iswalpha(wc) ? "A" : " ");
putchar('\n');
}
}
The code above generates the following result.