std::iswxdigit
From cppreference.com
Defined in header <cwctype>
|
||
int iswxdigit( wint_t ch ); |
||
Checks if the given wide character corresponds (if narrowed) to a hexadecimal numeric character, i.e. one of 0123456789abcdefABCDEF
.
If the value of ch is neither representable as a wchar_t nor equal to the value of the macro WEOF, the behavior is undefined.
Contents |
[edit] Parameters
ch | - | wide character |
[edit] Return value
Non-zero value if the wide character is a hexadecimal numeric character, zero otherwise.
[edit] Notes
std::iswdigit and std::iswxdigit
are the only standard wide character classification functions that are not affected by the currently installed C locale.
[edit] Example
Run this code
#include <cwctype> #include <iostream> int main() { std::cout << std::boolalpha << (std::iswxdigit(L'a') != 0) << ' ' << (std::iswxdigit(L'รค') != 0) << '\n'; }
Output:
true false
[edit] See also
checks if a character is classified as a hexadecimal digit by a locale (function template) | |
checks if a character is a hexadecimal character (function) | |
C documentation for iswxdigit
|
ASCII values | characters |
---|