diff --git a/src/base/system.cpp b/src/base/system.cpp index d08cb7d02..406c8e36f 100644 --- a/src/base/system.cpp +++ b/src/base/system.cpp @@ -3430,6 +3430,17 @@ int str_isallnum(const char *str) return 1; } +int str_isallnum_hex(const char *str) +{ + while(*str) + { + if(!(*str >= '0' && *str <= '9') && !(*str >= 'a' && *str <= 'f') && !(*str >= 'A' && *str <= 'F')) + return 0; + str++; + } + return 1; +} + int str_toint(const char *str) { return str_toint_base(str, 10); diff --git a/src/base/system.h b/src/base/system.h index 74ed2fe63..6535d66dd 100644 --- a/src/base/system.h +++ b/src/base/system.h @@ -2186,7 +2186,11 @@ float str_tofloat(const char *str); int str_isspace(char c); char str_uppercase(char c); + int str_isallnum(const char *str); + +int str_isallnum_hex(const char *str); + unsigned str_quickhash(const char *str); enum