Name
isgraph
Synopsis
Ascertains whether a given character is graphic
#include <ctype.h> intisgraph( intc);
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.
Example
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()
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access