Name
iswprint
Synopsis
Ascertains whether a given wide character is printable
#include <wctype.h> intiswprint( wint_twc);
The iswprint() function is
the wide-character version of the isprint() character classification
function. It tests whether its argument is a printing character. If
the argument is a printing wide character, iswprint() returns a nonzero value (that
is, true); if not, the function
returns 0 (false).
“Printing” means only that the character occupies printing
space on the output medium, not that it fills the space with a
glyph. In other words, iswprint()
may return true for
locale-specific whitespace characters, as well as for the space
character, L' '.
Which character codes represent printable characters 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 iswalpha() in this
chapter.
See Also
iswspace(); the
corresponding function for byte characters, isprint(); iswalnum(), iswalpha(), iswblank(), iswcntrl(), iswdigit(), iswlower(), iswpunct(), 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