[PATCH] comctl32/listview: Use case-insensitive compare in LVM_FINDITEM.

Alexandre Julliard julliard at winehq.org
Thu Jul 16 02:25:32 CDT 2020


Nikolay Sivov <nsivov at codeweavers.com> writes:

> @@ -6292,6 +6292,13 @@ static BOOL LISTVIEW_EnsureVisible(LISTVIEW_INFO *infoPtr, INT nItem, BOOL bPart
>      return TRUE;
>  }
>  
> +static unsigned int startswithW(const WCHAR *str, const WCHAR *sub)
> +{
> +    const WCHAR *p1 = str, *p2 = sub;
> +    while (*p1 && *p2 && towlower(*p1) == towlower(*p2)) { p1++; p2++; }
> +    return !*p2;
> +}

That's inefficient, and it won't do the same comparison as the full
string case. You probably want something like StrCmpNIW.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list