Return the decimal value of a hex character

Synopsis

Declared in header </boost/url/grammar/hexdig_chars.hpp#L123[boost/url/grammar/hexdig_chars.hpp,window=blank_]>

signed char
hexdig_value(char ch) noexcept;

Description

This function returns the decimal value of a hexadecimal character, or -1 if the argument is not a valid hexadecimal digit.

BNF

HEXDIG      = DIGIT
            / "A" / "B" / "C" / "D" / "E" / "F"
            / "a" / "b" / "c" / "d" / "e" / "f"

Return Value

  • signed char

Parameters

Name Type

ch

char