diff --git a/dlls/comctl32/comctl32.spec b/dlls/comctl32/comctl32.spec index ae8e7a8b403..c13d0661882 100644 --- a/dlls/comctl32/comctl32.spec +++ b/dlls/comctl32/comctl32.spec @@ -74,7 +74,7 @@ 360 stdcall -noname StrCmpNW(wstr wstr long) COMCTL32_StrCmpNW 361 stdcall -noname StrCmpNIW(wstr wstr long) COMCTL32_StrCmpNIW 362 stdcall -noname StrStrW(wstr wstr) COMCTL32_StrStrW -363 stub -noname StrStrIW +363 stdcall -noname StrStrIW(wstr wstr) COMCTL32_StrStrIW 364 stdcall -noname StrSpnW(wstr wstr) COMCTL32_StrSpnW 365 stdcall -noname StrToIntW(wstr) COMCTL32_StrToIntW 366 stub -noname StrChrIA diff --git a/dlls/comctl32/comctl32undoc.c b/dlls/comctl32/comctl32undoc.c index 9b95e9ea367..10be27b3c3b 100644 --- a/dlls/comctl32/comctl32undoc.c +++ b/dlls/comctl32/comctl32undoc.c @@ -2425,7 +2425,6 @@ COMCTL32_StrStrIA (LPCSTR lpStr1, LPCSTR lpStr2) return (NULL); } - /************************************************************************** * StrToIntA [COMCTL32.357] Converts a string to a signed integer. */ @@ -2436,6 +2435,38 @@ COMCTL32_StrToIntA (LPSTR lpString) return atoi(lpString); } +/************************************************************************** + * StrStrIW [COMCTL32.363] + */ + +LPWSTR WINAPI +COMCTL32_StrStrIW (LPCWSTR lpStr1, LPCWSTR lpStr2) +{ + INT len1, len2, i; + WCHAR first; + + if (*lpStr2 == 0) + return ((LPWSTR)lpStr1); + len1 = 0; + while (lpStr1[len1] != 0) ++len1; + len2 = 0; + while (lpStr2[len2] != 0) ++len2; + if (len2 == 0) + return ((LPWSTR)(lpStr1 + len1)); + first = tolowerW (*lpStr2); + while (len1 >= len2) { + if (tolowerW (*lpStr1) == first) { + for (i = 1; i < len2; ++i) + if (tolowerW (lpStr1[i]) != tolowerW(lpStr2[i])) + break; + if (i >= len2) + return ((LPWSTR)lpStr1); + } + ++lpStr1; --len1; + } + return (NULL); +} + /************************************************************************** * StrToIntW [COMCTL32.365] Converts a wide char string to a signed integer. */