ReactOS 0.4.16-dev-927-g467dec4
CompareStringW.cpp File Reference
#include <corecrt_internal.h>
Include dependency graph for CompareStringW.cpp:

Go to the source code of this file.

Functions

int __cdecl __acrt_CompareStringW (LPCWSTR LocaleName, DWORD dwCmpFlags, PCWCH lpString1, int cchCount1, PCWCH lpString2, int cchCount2)
 

Function Documentation

◆ __acrt_CompareStringW()

int __cdecl __acrt_CompareStringW ( LPCWSTR  LocaleName,
DWORD  dwCmpFlags,
PCWCH  lpString1,
int  cchCount1,
PCWCH  lpString2,
int  cchCount2 
)

Definition at line 35 of file CompareStringW.cpp.

43{
44 /*
45 * CompareString will compare past nullptr. Must find nullptr if in string
46 * before cchCountn wide characters.
47 */
48
49 if (cchCount1 > 0)
50 cchCount1= (int) wcsnlen(lpString1, cchCount1);
51 if (cchCount2 > 0)
52 cchCount2= (int) wcsnlen(lpString2, cchCount2);
53
54 if (!cchCount1 || !cchCount2)
55 return (cchCount1 - cchCount2 == 0) ? 2 :
56 (cchCount1 - cchCount2 < 0) ? 1 : 3;
57
59 dwCmpFlags,
60 lpString1,
61 cchCount1,
62 lpString2,
63 cchCount2,
64 nullptr,
65 nullptr,
66 0);
67}
static _In_ LPCWSTR LocaleName
int WINAPI __acrt_CompareStringEx(_In_opt_ LPCWSTR locale_name, _In_ DWORD flags, _In_NLS_string_(string1_count) LPCWCH string1, _In_ int string1_count, _In_NLS_string_(string2_count) LPCWCH string2, _In_ int string2_count, _Reserved_ LPNLSVERSIONINFO version, _Reserved_ LPVOID reserved, _Reserved_ LPARAM param)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
size_t __cdecl wcsnlen(wchar_t const *const string, size_t const maximum_count)
Definition: strnlen.cpp:210