mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Case insensitive string compare inside installers
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@954 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -370,6 +370,17 @@ bool is_substr(const String& str, size_t pos, const String& cmp) {
|
||||
return is_substr(str, pos, cmp.c_str());
|
||||
}
|
||||
|
||||
|
||||
bool is_substr_i(const String& str, size_t pos, const Char* cmp) {
|
||||
for (String::const_iterator it = str.begin() + pos ; *cmp && it < str.end() ; ++cmp, ++it) {
|
||||
if (toLower(*cmp) != toLower(*it)) return false;
|
||||
}
|
||||
return *cmp == _('\0');
|
||||
}
|
||||
bool is_substr_i(const String& str, size_t pos, const String& cmp) {
|
||||
return is_substr_i(str, pos, cmp.c_str());
|
||||
}
|
||||
|
||||
bool cannocial_name_compare(const String& as, const Char* b) {
|
||||
const Char* a = as.c_str();
|
||||
while (true) {
|
||||
|
||||
Reference in New Issue
Block a user