isgraph, iswgraph, _ismbcgraph

De RAD Studio
Aller à : navigation, rechercher

Remonter à Ctype.h - Index


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

+

+

+