public member function
<regex>

std::regex_traits::value

int value (char_type c, int radix) const;
Value of a digit character
Returns the value represented by the digit c in base radix.
If c is not a valid digit character, the function returns -1.

Parameters

c
A character.
char_type is a member type, alias of the character type. In regex_traits it is an alias of its template parameter (charT).
radix
The numerical base: either 8 (for octal), 10 (for decimal) or 16 (for hexadecimal).

Return value

The value representation of c if c is a valid digit, or -1 otherwise.

See also