shlwapi: implement StrChrNW

Bruno Jesus 00cpxxx at gmail.com
Thu Sep 24 06:09:08 CDT 2009


On Thu, Sep 24, 2009 at 00:32, Dmitry Timoshkov <dmitry at codeweavers.com> wrote:
> "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?

It's stated in the microsoft page :
http://msdn.microsoft.com/en-us/library/cc836542%28VS.85%29.aspx

Bruno

> --
> Dmitry.
>
>
>



-- 
Engenharia de Software
Planeta Informática 55 19 3289-7755

universe* god::bigbang (void); //and then it all began...



More information about the wine-devel mailing list