2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 23:07:42 +00:00

TCastTo implementation

This commit is contained in:
Jack Andersen
2017-01-14 17:07:01 -10:00
parent 3544cbd278
commit e2c671e9b4
111 changed files with 766 additions and 35 deletions

View File

@@ -22,6 +22,16 @@ public:
{
return CompareCaseInsensitive(a.c_str(), b.c_str());
}
static int IndexOfSubstring(const std::string& haystack, const std::string& needle)
{
std::string str = haystack;
std::transform(str.begin(), str.end(), str.begin(), tolower);
std::string::size_type s = str.find(needle);
if (s == std::string::npos)
return -1;
return s;
}
};
}