summaryrefslogtreecommitdiff
path: root/src/core/Utils.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/Utils.hpp')
-rw-r--r--src/core/Utils.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/Utils.hpp b/src/core/Utils.hpp
index 14bd7b4..5332b50 100644
--- a/src/core/Utils.hpp
+++ b/src/core/Utils.hpp
@@ -40,6 +40,15 @@ public:
static bool isNumeric(const char c) { return (c >= '0') && (c <= '9'); }
/**
+ * Returns true if the given character is in [0-9A-Fa-f]
+ */
+ static bool isHexadecimal(const char c)
+ {
+ return ((c >= '0') && (c <= '9')) || ((c >= 'A') && (c <= 'F')) ||
+ ((c >= 'a') && (c <= 'f'));
+ }
+
+ /**
* Returns true if the given character is in [A-Za-z0-9]
*/
static bool isAlphanumeric(const char c)