diff options
Diffstat (limited to 'src/string_utils.h')
-rw-r--r-- | src/string_utils.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/string_utils.h b/src/string_utils.h index 9ae0abcb..7770e1eb 100644 --- a/src/string_utils.h +++ b/src/string_utils.h @@ -89,6 +89,12 @@ serd_substrlen(const uint8_t* str, size_t* n_bytes, SerdNodeFlags* flags); +static inline uint8_t +hex_digit_value(const uint8_t c) +{ + return (uint8_t)((c > '9') ? ((c & ~0x20) - 'A' + 10) : (c - '0')); +} + static inline char serd_to_upper(const char c) { |