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.
Declared in <uint256.h>
template<class uintN_t>
std::optional<uintN_t>
FromUserHex(std::string_view input);
Designed to be used when dealing with user input.
The parsed value, or std::nullopt if the input is invalid.
| Name | Description |
|---|---|
| input | The hex string to parse, optionally prefixed with "0x". |