absl::HexStringToBytes

Converts an ASCII hex string into bytes, returning binary data of length from.size()/2. The input must be valid hexadecimal data, otherwise the return value is unspecified.

Synopsis

Declared in <absl/strings/escaping.h>

[[deprecated("Use the HexStringToBytes() that returns a bool")]]
std::string
HexStringToBytes(std::string_view from);

WARNING

Deprecated: Use the HexStringToBytes() that returns a bool. Use of this entity is allowed but discouraged.

Return Value

The decoded binary data.

Parameters

NameDescription
fromThe hexadecimal-encoded string to decode.