Make FcStrCmpIgnoreCase a bit faster

This commit is contained in:
Keith Packard 2003-02-12 18:20:04 +00:00
parent c8d5753c0f
commit b2b6903259
1 changed files with 7 additions and 4 deletions

View File

@ -72,13 +72,16 @@ FcStrCmpIgnoreCase (const FcChar8 *s1, const FcChar8 *s2)
{
c1 = *s1++;
c2 = *s2++;
if (!c1 || !c2)
if (!c1)
break;
if (c1 != c2)
{
c1 = FcToLower (c1);
c2 = FcToLower (c2);
if (c1 != c2)
break;
}
}
return (int) c1 - (int) c2;
}