Added CStr::FindInsensitive

This was SVN commit r1479.
This commit is contained in:
Ykkrosh 2004-12-09 16:54:02 +00:00
parent 6a04509455
commit c3fafdca99
2 changed files with 10 additions and 0 deletions

View File

@ -119,6 +119,11 @@ long CStr::Find(const int &start, const TCHAR &tchar) const
return -1;
}
long CStr::FindInsensitive(const int &start, const TCHAR &tchar) const { return LCase().Find(start, _totlower(tchar)); }
long CStr::FindInsensitive(const TCHAR &tchar) const { return LCase().Find(_totlower(tchar)); }
long CStr::FindInsensitive(const CStr& Str) const { return LCase().Find(Str.LCase()); }
long CStr::ReverseFind(const CStr& Str) const
{
size_t Pos = rfind(Str, length() );

View File

@ -155,6 +155,11 @@ public:
long Find(const TCHAR &tchar) const;
long Find(const int &start, const TCHAR &tchar) const;
// Case-insensitive versions of Find
long FindInsensitive(const CStr& Str) const;
long FindInsensitive(const TCHAR &tchar) const;
long FindInsensitive(const int &start, const TCHAR &tchar) const;
// You can also do a "ReverseFind" - i.e. search starting from the end
long ReverseFind(const CStr& Str) const;