Namespaces
Variants
Actions

std::iswxdigit

From cppreference.com
< cpp‎ | string‎ | wide
 
 
 
 
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

#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) [edit]
checks if a character is a hexadecimal character
(function) [edit]
C documentation for iswxdigit
ASCII values characters

iscntrl