diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/util/corestr.cpp | 10 | ||||
-rw-r--r-- | src/lib/util/corestr.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/util/corestr.cpp b/src/lib/util/corestr.cpp index 4431f6d08ac..66b12f6ee04 100644 --- a/src/lib/util/corestr.cpp +++ b/src/lib/util/corestr.cpp @@ -107,6 +107,16 @@ int core_strwildcmp(const char *sp1, const char *sp2) return core_stricmp(s1, s2); } +bool core_iswildstr(const char *sp) +{ + for ( ; sp && *sp; sp++) + { + if (('?' == *sp) || ('*' == *sp)) + return true; + } + return false; +} + /*------------------------------------------------- core_strdup - string duplication via malloc diff --git a/src/lib/util/corestr.h b/src/lib/util/corestr.h index 1e12c0d0e24..9a9bce23e99 100644 --- a/src/lib/util/corestr.h +++ b/src/lib/util/corestr.h @@ -59,6 +59,7 @@ char *core_strdup(const char *str); /* additional string compare helper (up to 16 characters at the moment) */ int core_strwildcmp(const char *sp1, const char *sp2); +bool core_iswildstr(const char *sp); int strcatvprintf(std::string &str, const char *format, va_list args); |