Writes the hex string (in reverse byte order) into a new uintN_t object and only returns a value iff all of the checks pass: ‐ Input length is uintN_t::size()*2 ‐ All characters are hex

Synopsis

Declared in <uint256.h>

template<class uintN_t>
std::optional<uintN_t>
FromHex(std::string_view str);

Return Value

The parsed value, or std::nullopt if the length or characters are invalid.

Parameters

Name

Description

str

The hex string to parse, expected to be uintN_t::size()*2 characters.

Created with MrDocs