Decode two hex digit characters into a byte.
Declared in <llvm/ADT/StringExtras.h>
bool
tryGetHexFromNibbles(
char MSB,
char LSB,
uint8_t& Hex);
Store the binary representation of the two provided values, MSB and LSB, that make up the nibbles of a hexadecimal digit. If MSB or LSB do not correspond to proper nibbles of a hexadecimal digit, this method returns false. Otherwise, returns true.
True if both characters were valid hex digits.
| Name | Description |
|---|---|
| MSB | high nibble as a hex digit character |
| LSB | low nibble as a hex digit character |
| Hex | set to the decoded byte on success |