Previous Page
Next Page


Ascertains whether a given wide character is printable

#include <wctype.h>
int iswprint ( wint_t wc  );

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.


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( )

Previous Page
Next Page