Implemented StrStrIW.

This commit is contained in:
Robert Shearman 2002-12-13 23:25:59 +00:00 committed by Alexandre Julliard
parent f3128dad92
commit 096becedd8
2 changed files with 33 additions and 2 deletions

View File

@ -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

View File

@ -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.
*/