summaryrefslogtreecommitdiff
path: root/src/core/Utils.hpp
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2014-12-05 17:53:46 +0100
committerAndreas Stöckel <andreas@somweyr.de>2014-12-05 17:53:46 +0100
commit2069538e089696eead64169895c935ff4bc577ba (patch)
tree2da913db918ff62a3626f81383bec79abd7ab976 /src/core/Utils.hpp
parent2dd08daa56c05d6c720a30fd9ec14a2471f81c5f (diff)
implemented parsing integers and doubles
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)