[fpc-pascal] optimization for strlicomp()
Jonas Maebe
jonas at freepascal.org
Mon Jun 1 14:51:03 CEST 2020
On 01/06/2020 09:22, Michael Van Canneyt wrote:
>
>
> On Sun, 31 May 2020, Alexey Tor. via fpc-pascal wrote:
>
>> b)
>> embed upcase to avoid CALL
>> c1:=simplewideupcase(str1[counter]);
>> c2:=simplewideupcase(str2[counter]);
>> ->
>> c1:= str1[counter];
>> c2:= str2[counter];
>> if (c1>='a') and (c1<='z') then dec(c1, 32);
>> if (c2>='a') and (c2<='z') then dec(c2, 32);
>
> I think the correct solution is to use a correct widestring upcase, not
> the simple one.
No, strlicomp is defined as not taking internationalisation into
account:
http://docwiki.embarcadero.com/Libraries/Rio/en/System.SysUtils.StrLIComp
Jonas
More information about the fpc-pascal
mailing list