iswgraph - C wctype.h

C examples for wctype.h:iswgraph

Type

function

From


<cwctype>
<wctype.h>

Description

Check if wide character has graphical representation

Prototype

int iswgraph (wint_t c);

Parameters

Parameter Description
c Wide character to be checked

Return Value

A non zero value (i.e., true) if c is a character with graphical representation. Zero (i.e., false) otherwise.

Demo Code


#include <stdio.h>
#include <wctype.h>
int main ()//from   w w w . jav a 2 s .c  o  m
{
  FILE * pFile;
  wint_t c;
  pFile = fopen ("myfile.txt","r");
  if (pFile)
  {
    do {
      c = fgetwc (pFile);
      if (iswgraph(c)) 
         putwchar (c);
    } while (c != WEOF);
    fclose (pFile);
  }
}

Related Tutorials