diff options
Diffstat (limited to 'engines/titanic/support/string.cpp')
-rw-r--r-- | engines/titanic/support/string.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/titanic/support/string.cpp b/engines/titanic/support/string.cpp index cf1b29b6ec..6687c24321 100644 --- a/engines/titanic/support/string.cpp +++ b/engines/titanic/support/string.cpp @@ -77,6 +77,15 @@ int CString::lastIndexOf(char c) const { return charP ? charP - c_str() : -1; } +bool CString::containsIgnoreCase(const CString &str) const { + CString lowerStr = *this; + CString subStr = str; + lowerStr.toLowercase(); + subStr.toLowercase(); + + return lowerStr.contains(subStr); +} + FileType CString::fileTypeSuffix() const { CString ext = right(1); if (ext == "0" || ext == "4") |