Convert a hexadecimal string to binary bytes.
Declared in <llvm/ADT/StringExtras.h>
bool
tryGetFromHex(
StringRef Input,
std::string& Output);
Convert hexadecimal string Input to its binary representation and store the result in Output. Returns true if the binary representation could be converted from the hexadecimal string. Returns false if Input contains non-hexadecimal digits. The output string is half the size of Input.
True if Input was successfully decoded.
| Name | Description |
|---|---|
| Input | hexadecimal text to decode |
| Output | set to the decoded binary bytes on success |