[#TryParseHex]
= TryParseHex
:mrdocs:

Parse the hex string into bytes (uint8&lowbar;t or std&colon;&colon;byte)&period; Ignores whitespace&period; Returns nullopt on invalid input&period;

== Synopsis

Declared in `&lt;util&sol;strencodings&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Byte = std::byte&gt;
std::optional&lt;std::vector&lt;Byte&gt;&gt;
TryParseHex(std::string&lowbar;view str);
----

== Return Value

The decoded bytes, or std&colon;&colon;nullopt if the input is not valid hex&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *str*
| The hex string to parse&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
