Re: [PATCH 2/2] msvcrt: Implement _strnicoll.
Eryk Wieliczko <ewdevel(a)gmail.com> wrote:
/********************************************************************* + * _strnicoll (MSVCRT.@) + */ +int CDECL MSVCRT__strnicoll(const char* str1, const char* str2, int digits) +{ + int res; + + res = strncmp(str1, str2, digits); + if (res > 0) + res = 1; + else if (res < 0) + res = -1; + + return res; +}
The API name implies case insensitive comparison, please add the tests for that. -- Dmitry.
Please reject this set as it is obviously wrong. -- Eryk Wieliczko 2011/2/11 Dmitry Timoshkov <dmitry(a)codeweavers.com>:
Eryk Wieliczko <ewdevel(a)gmail.com> wrote:
/********************************************************************* + * _strnicoll (MSVCRT.@) + */ +int CDECL MSVCRT__strnicoll(const char* str1, const char* str2, int digits) +{ + int res; + + res = strncmp(str1, str2, digits); + if (res > 0) + res = 1; + else if (res < 0) + res = -1; + + return res; +}
The API name implies case insensitive comparison, please add the tests for that.
-- Dmitry.
participants (2)
-
Dmitry Timoshkov -
Eryk Wieliczko