HexStringToBytes overloads
Declared in <absl/strings/escaping.h>
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.
[[deprecated("Use the HexStringToBytes() that returns a bool")]]
std::string
HexStringToBytes(std::string_view from);
» more...
Converts the hexadecimal encoded data in hex into raw bytes in the bytes output string. If hex does not consist of valid hexadecimal data, this function returns false and leaves bytes in an unspecified state. Returns true on success.
[[nodiscard]]
bool
HexStringToBytes(
std::string_view hex,
std::string* bytes);
» more...
true on success, false if hex is not valid hexadecimal data.| Name | Description |
|---|---|
| from | The hexadecimal-encoded string to decode. |
| hex | The hexadecimal-encoded string to decode. |
| bytes | The output string that receives the decoded bytes. |