iswalpha - C wctype.h

C examples for wctype.h:iswalpha

Type

function

From


<cwctype>
<wctype.h>

Description

Check if wide character is alphabetic

Prototype

int iswalpha (wint_t c);

Parameters

Parameter Description
c Wide character to be checked

Return Value

A non zero value (i.e., true) if c is an alphabetic letter. Zero (i.e., false) otherwise.

Demo Code


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

Related Tutorials