Previous Page
Next Page

iswdigit

Ascertains whether a given wide character is a decimal digit

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

The iswdigit( ) function is the wide-character version of the isdigit( ) character classification function. It tests whether its wide character argument corresponds to a digit character.

The results depend on the current locale setting for the localization category LC_CTYPE, which you can query or change using the setlocale( ) function. In the default locale C, the digit wide characters are L'0' (not to be confused with the null character L'\0') tHRough L'9'. The iswdigit( ) function returns a nonzero value (that is, true) if the wide character represents a digit; if not, it returns 0 (false).

Example

See the example for iswalpha( ) in this chapter.

See Also

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


Previous Page
Next Page