:relfileprefix: ../../../
[#boost-urls-grammar-hexdig_value]

= xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/grammar.adoc[pass:[grammar]]::hexdig_value


Return the decimal value of a hex character


== Synopsis

Declared in header `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/grammar/hexdig_chars.hpp#L123[boost/url/grammar/hexdig_chars.hpp,window=blank_]>`

[source,cpp,subs="verbatim,macros,-callouts"]
----
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
[,cpp]
----
HEXDIG      = DIGIT
            / "A" / "B" / "C" / "D" / "E" / "F"
            / "a" / "b" / "c" / "d" / "e" / "f"
----




== Return Value


The decimal value or -1



== Parameters

|===
| Name | Description 

| *ch*
| 
The character to check

|===




