RAD Studio
ContentsIndex
PreviousUpNext
isgraph, iswgraph, _ismbcgraph

Header File 

ctype.h, mbstring.h 

Category 

Classification Routines 

Prototype 

int isgraph(int c); 

int iswgraph(wint_t c); 

int _ismbcgraph( unsigned int c); 

Description 

Tests for printing character. 

isgraph is a macro that classifies ASCII-coded integer values by table lookup. The macro is affected by the current locale’s LC_CTYPE category. For the default C locale, c is a printing character except blank space (‘ ‘). 

You can make this macro available as a function by undefining (#undef) it. 

Return Value 

isgraph returns nonzero if c is a printing character. 

Example  

#include <stdio.h>
#include <ctype.h>
int main(void)
{
  char c = 'C';
  if (isgraph(c))
    printf("%c is a graphic character\n",c);
  else 
    printf("%c is not a graphic character\n",c);
  return 0;
}

Portability

 
POSIX 
Win32 
ANSI C 
ANSI C++ 
isgraph 
_ismbcgraph 
 
 
 
iswgraph 
 
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!