9 return (c >=
'0' && c <=
'9') || (c >=
'a' && c <=
'f') ||
10 (c >=
'A' && c <=
'F');
14constexpr auto hex_value(
char c)
noexcept -> uint8_t {
15 if (c >=
'0' && c <=
'9')
16 return static_cast<uint8_t
>(c -
'0');
17 if (c >=
'a' && c <=
'f')
18 return static_cast<uint8_t
>(10 + c -
'a');
19 return static_cast<uint8_t
>(10 + c -
'A');
Definition classify.hxx:5
constexpr bool is_hex_digit(char c) noexcept
Return true when c is an ASCII hexadecimal digit.
Definition classify.hxx:8
constexpr auto hex_value(char c) noexcept -> uint8_t
Convert an ASCII hexadecimal digit to its numeric value.
Definition classify.hxx:14