summaryrefslogtreecommitdiff
path: root/src/helpers.cpp
diff options
context:
space:
mode:
authorAndrzej Rybczak <electricityispower@gmail.com>2012-08-14 16:09:45 +0200
committerAndrzej Rybczak <electricityispower@gmail.com>2012-08-14 16:09:45 +0200
commitbab756c57952238bfcd306f1e3a6e6f42f4338c6 (patch)
tree4fd2370b605a60ec16139b6e9ab38a1e0ba64194 /src/helpers.cpp
parentd51edfd262bb11845fa026004549c81e8aa6b716 (diff)
add support for priorities (queueing)
Diffstat (limited to 'src/helpers.cpp')
-rw-r--r--src/helpers.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/helpers.cpp b/src/helpers.cpp
index 6cecec01..11aa2347 100644
--- a/src/helpers.cpp
+++ b/src/helpers.cpp
@@ -481,3 +481,14 @@ std::basic_string<my_char_t> Scroller(const std::basic_string<my_char_t> &str, s
result = s;
return result;
}
+
+bool isInteger(const char *s)
+{
+ assert(s);
+ if (*s == '\0')
+ return false;
+ for (const char *it = s; *it != '\0'; ++it)
+ if (!isdigit(*it) && (it != s || *it != '-'))
+ return false;
+ return true;
+}