Added CStr::FindInsensitive
This was SVN commit r1479.
This commit is contained in:
parent
6a04509455
commit
c3fafdca99
@ -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() );
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user