Previous Page
Next Page

iswpunct

Ascertains whether a given wide character is a punctuation mark

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

The iswpunct( ) function is the wide-character version of the ispunct( ) character classification function. It tests whether its wide character argument is a punctuation mark. If the argument represents a punctuation mark, iswpunct( ) returns a nonzero value (that is, TRue); if not, the function returns 0 (false).

Which characters represent punctuation marks depends on the current locale setting for the category LC_CTYPE, which you can query or change using the setlocale( ) function. For all locale-specific punctuation characters, both iswspace( ) and iswalnum( ) return false.

If the wide character is not the space character L' ', but is both a printing and a whitespace characterthat is, both iswprint(wc) and iswspace(wc) return truethen the function call iswpunct(wc) may yield a different value than the corresponding byte-character function call ispunct(wctob(wc)).

Example

See the example for iswalpha( ) in this chapter.

See Also

The corresponding function for byte characters, ispunct( ); iswalnum( ), iswalpha( ), iswblank( ), iswcntrl( ), iswdigit( ), iswgraph( ), iswlower( ), iswprint( ), iswspace( ), iswupper( ), iswxdigit( ), setlocale( ); the extensible wide-character classification function, iswctype( )


Previous Page
Next Page