diff options
Diffstat (limited to 'engines/titanic/string.cpp')
-rw-r--r-- | engines/titanic/string.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/titanic/string.cpp b/engines/titanic/string.cpp index 128a9a38eb..f726f78c21 100644 --- a/engines/titanic/string.cpp +++ b/engines/titanic/string.cpp @@ -40,4 +40,9 @@ CString CString::mid(uint start, uint count) const { return CString(c_str() + start, MIN(count, size() - start)); } +int CString::indexOf(char c) { + const char *charP = strchr(c_str(), c); + return charP ? charP - c_str() : -1; +} + } // End of namespace Titanic |