[ATL] Add CString.CompareNoCase

This commit is contained in:
Mark Jansen 2018-06-06 00:21:06 +02:00
parent 0ec08818b5
commit 4f8dc9c266
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B

View file

@ -133,6 +133,13 @@ public:
return ::wcscmp(psz1, psz2);
}
static int __cdecl CompareNoCase(
_In_z_ LPCWSTR psz1,
_In_z_ LPCWSTR psz2)
{
return ::_wcsicmp(psz1, psz2);
}
static int __cdecl FormatV(
_In_opt_z_ LPWSTR pszDest,
_In_z_ LPCWSTR pszFormat,
@ -265,6 +272,13 @@ public:
return ::strcmp(psz1, psz2);
}
static int __cdecl CompareNoCase(
_In_z_ LPCSTR psz1,
_In_z_ LPCSTR psz2)
{
return ::_stricmp(psz1, psz2);
}
static int __cdecl FormatV(
_In_opt_z_ LPSTR pszDest,
_In_z_ LPCSTR pszFormat,
@ -593,6 +607,10 @@ public:
return StringTraits::Compare(CThisSimpleString::GetString(), psz);
}
int CompareNoCase(_In_z_ PCXSTR psz) const
{
return StringTraits::CompareNoCase(CThisSimpleString::GetString(), psz);
}
CStringT Mid(int iFirst, int nCount) const
{