ParseHex

Like TryParseHex, but returns an empty vector on invalid input.

Synopsis

Declared in <util/strencodings.h>

template<typename Byte = uint8_t>
std::vector<Byte>
ParseHex(std::string_view hex_str);

Return Value

The decoded bytes, or an empty vector if the input is not valid hex.

Parameters

NameDescription
hex_strThe hex string to parse.