diff options
Diffstat (limited to 'src/uscxml/Convenience.h')
-rw-r--r-- | src/uscxml/Convenience.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/uscxml/Convenience.h b/src/uscxml/Convenience.h index 54e62c3..86a0b52 100644 --- a/src/uscxml/Convenience.h +++ b/src/uscxml/Convenience.h @@ -50,6 +50,12 @@ inline bool isNumeric( const char* pszInput, int nNumberBase) { return (input.find_first_not_of(base.substr(0, nNumberBase + 2)) == std::string::npos); } +inline bool isInteger( const char* pszInput, int nNumberBase) { + std::string base = "-0123456789ABCDEF"; + std::string input = pszInput; + return (input.find_first_not_of(base.substr(0, nNumberBase + 1)) == std::string::npos); +} + inline bool iequals(const std::string& a, const std::string& b) { // this impementation beats boost::iequals 2700ms vs 2100ms for test-performance.scxml - we don't care for non-ascii yet unsigned int size = a.size(); |