C examples for wctype.h:iswalnum
function
<cwctype> <wctype.h>
Check if wide character is alphanumeric
int iswalnum (wint_t c);
Parameter | Description |
---|---|
c | Wide character to be checked. |
A non zero value (i.e., true) if c is either a digit or a letter. Zero (i.e., false) otherwise.
#include <stdio.h> #include <wctype.h> int main ()/*from ww w .j a v a 2 s. c om*/ { int i; wchar_t str[] = L"test1...124"; i=0; while (iswalnum(str[i])) i++; wprintf (L"The first %d characters are alphanumeric.\n",i); return 0; }