aboutsummaryrefslogtreecommitdiffstats
path: root/src/serd_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/serd_internal.h')
-rw-r--r--src/serd_internal.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/serd_internal.h b/src/serd_internal.h
index aa5b3c53..afbea5fb 100644
--- a/src/serd_internal.h
+++ b/src/serd_internal.h
@@ -294,6 +294,13 @@ is_digit(const uint8_t c)
return in_range(c, '0', '9');
}
+/* RFC2234: HEXDIG ::= DIGIT / "A" / "B" / "C" / "D" / "E" / "F" */
+static inline bool
+is_hexdig(const uint8_t c)
+{
+ return is_digit(c) || in_range(c, 'A', 'F');
+}
+
static inline bool
is_space(const char c)
{