[#detail-FromUserHex] = xref:detail.adoc[detail]::FromUserHex :relfileprefix: ../ :mrdocs: Like FromHex(std::string_view str), but allows an "0x" prefix and pads the input with leading zeroes if it is shorter than the expected length of uintN_t::size()*2. == Synopsis Declared in `<uint256.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class uintN_t> std::optional<uintN_t> FromUserHex(std::string_view input); ---- == Description Designed to be used when dealing with user input. == Return Value The parsed value, or std::nullopt if the input is invalid. == Parameters [cols="1,4"] |=== | Name| Description | *input* | The hex string to parse, optionally prefixed with "0x". |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#