Name
iswgraph
Synopsis
Ascertains whether a given wide character is graphic
#include <wctype.h> intiswgraph( wint_twc);
The iswgraph() function is
the wide-character version of the isgraph() character classification
function. It tests whether its character argument is a graphic
character; that is, whether the value represents a printable
character that is not a whitespace character. In other words,
iswgraph(wc) is true if and only if iswprint(wc) is true and iswspace(wc) is false.
The function call iswgraph(wc) can yield a different value than the
corresponding byte-character function call isgraph(wctob(wc)) if wc is
both a printing character and a whitespace character in the
execution character set. In other words, isgraph(wctob(wc)) can be true while iswgraph(wc) is false, if both iswprint(wc) and iswspace(wc) are true. Or, to put it yet another way,
while the space character (' ')
is the only printable character for which isgraph() returns false, iswgraph() may return false for other printable, whitespace
characters in addition to L'
'.
Example
See the example for iswalpha() in this
chapter.
See Also
The corresponding function for byte characters, isgraph(); iswalnum(), iswalpha(), iswblank(), iswcntrl(), iswdigit(), iswlower(), iswprint(), iswpunct(), iswspace(), iswupper(), iswxdigit(), setlocale(); the
extensible wide-character classification function, iswctype()
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