Remove CStr::Find(CStr)

It was only a wrapper around `std::string::find`. In some places it's
now better to use `std::string::starts_with`.
This commit is contained in:
phosit
2026-08-23 17:07:27 +02:00
parent 45ea0432a2
commit 982ede2a55
7 changed files with 17 additions and 47 deletions
-12
View File
@@ -264,17 +264,6 @@ double CStr::ToDouble() const
return ret;
}
// Search the string for another string
long CStr::Find(const CStr& str) const
{
size_t pos = find(str, 0);
if (pos != npos)
return static_cast<long>(pos);
return -1;
}
// Search the string for another string
long CStr::Find(const Char chr) const
{
@@ -299,7 +288,6 @@ long CStr::Find(const int start, const Char chr) const
long CStr::FindInsensitive(const int start, const Char chr) const { return LowerCase().Find(start, totlower(chr)); }
long CStr::FindInsensitive(const Char chr) const { return LowerCase().Find(totlower(chr)); }
long CStr::FindInsensitive(const CStr& str) const { return LowerCase().Find(str.LowerCase()); }
long CStr::ReverseFind(const CStr& str) const
{