mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
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:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user