Previous Page
Next Page


Ascertains whether a given character is graphic

#include <ctype.h>
int isgraph ( int c  );

The function isgraph( ) tests whether its character argument is a graphic character; that is, whether the value represents a printing character other than the space character. (In other words, the space character is considered printable, but not graphic.) If the character is graphic, isgraph( ) returns a nonzero value (that is, TRue); if not, the function returns 0 (false).

Whether a given character code represents a graphic character depends on the current locale setting for the category LC_CTYPE, which you can query or change using the setlocale( ) function.


See the example for isprint( ) in this chapter.

See Also

The corresponding C99 function for wide characters, iswgraph( ); isalnum( ), isalpha( ), isblank( ), iscntrl( ), isdigit( ), islower( ), isprint( ), ispunct( ), isspace( ), isupper( ), isxdigit( ), setlocale( )

Previous Page
Next Page