shlwapi: implement StrChrNW

Dmitry Timoshkov dmitry at codeweavers.com
Wed Sep 23 22:32:36 CDT 2009


"Aric Stewart" <aric at codeweavers.com> wrote:

> +LPWSTR WINAPI StrChrNW(LPCWSTR lpszStr, WCHAR ch, UINT cchMax)
> +{
> +  TRACE("(%s(%i),%i)\n", debugstr_wn(lpszStr,cchMax), cchMax, ch);
> +
> +  if (lpszStr)
> +  {
> +    ch = toupperW(ch);
> +    while (*lpszStr && cchMax > 0)
> +    {
> +      if (toupperW(*lpszStr) == ch)
> +        return (LPWSTR)lpszStr;
> +      lpszStr++;
> +      cchMax --;
> +    }
> +    lpszStr = NULL;
> +  }
> +  return (LPWSTR)lpszStr;
> +}

Are you sure that the search should be case insensitive?

-- 
Dmitry.



More information about the wine-devel mailing list