iswalnum - C wctype.h

C examples for wctype.h:iswalnum

Type

function

From


<cwctype>
<wctype.h>

Description

Check if wide character is alphanumeric

Prototype

int iswalnum (wint_t c);

Parameters

Parameter Description
c Wide character to be checked.

Return Value

A non zero value (i.e., true) if c is either a digit or a letter. Zero (i.e., false) otherwise.

Demo Code


#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;
}

Related Tutorials