diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2012-08-14 16:09:45 +0200 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2012-08-14 16:09:45 +0200 |
commit | bab756c57952238bfcd306f1e3a6e6f42f4338c6 (patch) | |
tree | 4fd2370b605a60ec16139b6e9ab38a1e0ba64194 /src/helpers.cpp | |
parent | d51edfd262bb11845fa026004549c81e8aa6b716 (diff) |
add support for priorities (queueing)
Diffstat (limited to 'src/helpers.cpp')
-rw-r--r-- | src/helpers.cpp | 11 |
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; +} |