https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4f8dc9c26663ea6d6721a96366cd90961f7b05c3

commit 4f8dc9c26663ea6d6721a96366cd90961f7b05c3
Author:     Mark Jansen <mark.jan...@reactos.org>
AuthorDate: Wed Jun 6 00:21:06 2018 +0200
Commit:     Mark Jansen <mark.jan...@reactos.org>
CommitDate: Sat Jun 9 17:14:06 2018 +0200

    [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 5d278c5a0a..87ac52aac6 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
     {

Reply via email to