From 4f8dc9c26663ea6d6721a96366cd90961f7b05c3 Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Wed, 6 Jun 2018 00:21:06 +0200 Subject: [PATCH] [ATL] Add CString.CompareNoCase --- sdk/lib/atl/cstringt.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sdk/lib/atl/cstringt.h b/sdk/lib/atl/cstringt.h index 5d278c5a0ad..87ac52aac6f 100644 --- a/sdk/lib/atl/cstringt.h +++ b/sdk/lib/atl/cstringt.h @@ -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 { -- 2.17.1