diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/General.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/General.h b/src/core/General.h index dde43c0f..478ef027 100644 --- a/src/core/General.h +++ b/src/core/General.h @@ -121,10 +121,19 @@ public: return *str2 != '\0'; } + static bool faststrncmp(const char *str1, const char *str2, uint32 count) + { + for(uint32 i = 0; *str1 && i < count; str1++, str2++, i++) { + if (*str1 != *str2) + return true; + } + return false; + } + static bool faststricmp(const char *str1, const char *str2) { for (; *str1; str1++, str2++) { -#if MUCH_SLOWER || !defined _WIN32 || defined __MINGW32__ +#ifndef ASCII_STRCMP if (toupper(*str1) != toupper(*str2)) #else if (__ascii_toupper(*str1) != __ascii_toupper(*str2)) |