Commit 096beced authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

Implemented StrStrIW.

parent f3128dad
......@@ -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
......
......@@ -2425,7 +2425,6 @@ COMCTL32_StrStrIA (LPCSTR lpStr1, LPCSTR lpStr2)
return (NULL);
}
/**************************************************************************
* StrToIntA [COMCTL32.357] Converts a string to a signed integer.
*/
......@@ -2437,6 +2436,38 @@ COMCTL32_StrToIntA (LPSTR 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.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment