Check if wide character is decimal digit
Checks whether c is a decimal digit character.
A decimal digit is any of: 0 1 2 3 4 5 6 7 8 9
This function is the wide-character equivalent of isdigit (<cctype>): If c translates with wctob to a character for which isdigit is true, it is always considered a decimal digit character by this function too.
In C++, a locale-specific template version of this function (isdigit) exists in header <locale> for all character types.
- Wide character to be checked, casted to a wint_t, or WEOF.
wint_t is an integral type.
A value different from zero (i.e., true) if indeed c is a decimal digit. Zero (i.e., false) otherwise.
/* iswdigit example */
int main ()
wchar_t str = L"1776ad";
long int year;
year = wcstol (str,NULL,10);
wprintf (L"The year that followed %ld was %ld.\n",year,year+1);
The year 1777 followed 1776
- Check if character is decimal digit (function
- Check if wide character is hexadecimal digit (function
- Check if wide character is alphanumeric (function
- Check if wide character is alphabetic (function
- isdigit (locale)
- Check if character is a decimal digit using locale (function template)