diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index e7294a552a3..8957e4226a4 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -938,8 +938,8 @@ @ cdecl _strncoll_l(str str long ptr) MSVCRT_strncoll @ cdecl _strnicmp(str str long) ntdll._strnicmp # stub _strnicmp_l(str str long ptr) -@ stub _strnicoll(str str long) -# stub _strnicoll_l(str str long ptr) +@ cdecl _strnicoll(str str long) MSVCRT__strnicoll +@ cdecl _strnicoll_l(str str long ptr) MSVCRT__strnicoll_l @ cdecl _strnset(str long long) MSVCRT__strnset # stub _strnset_s(str long long long) @ cdecl _strrev(str) diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c index b6fe68b0bbd..0e7da1e748a 100644 --- a/dlls/msvcrt/string.c +++ b/dlls/msvcrt/string.c @@ -585,6 +585,26 @@ int CDECL MSVCRT_strncoll( const char* str1, const char* str2, MSVCRT_size_t cou return MSVCRT_strncoll_l(str1, str2, count, NULL); } +/********************************************************************* + * _strnicoll_l (MSVCRT.@) + */ +int CDECL MSVCRT__strnicoll_l( const char* str1, const char* str2, MSVCRT_size_t count, MSVCRT__locale_t locale ) +{ + if(!locale) + locale = get_locale(); + + return CompareStringA(locale->locinfo->lc_handle[MSVCRT_LC_CTYPE], NORM_IGNORECASE, + str1, count, str2, count)-2; +} + +/********************************************************************* + * _strnicoll (MSVCRT.@) + */ +int CDECL MSVCRT__strnicoll( const char* str1, const char* str2, MSVCRT_size_t count ) +{ + return MSVCRT__strnicoll_l(str1, str2, count, NULL); +} + /********************************************************************* * strcpy_s (MSVCRT.@) */