[Lazarus] UTF8 string compare with correct locale sorting

Sven Barth pascaldragon at googlemail.com
Tue Oct 22 10:24:34 CEST 2013


Am 22.10.2013 09:37, schrieb Michael Schnell:
> On 10/21/2013 07:12 PM, Jy V wrote:
>>
>> it may require the user to provide 1 additional parameter to compare 
>> 2 strings
>> it should not be that difficult to use.
>
> Yep.
>
> Only that traditional Pascal programmers are not used to do
>
> if compareUTF8String(s1, s2, comparemode) < 0 then ...
>
> but
>
> if s1 < s2 then ....

I myself am more used to "CompareText/Str" than "<" or ">" as I didn't 
know until around 1 or 2 years ago that "<" and ">" are supported on 
strings at all ^^

Regards,
Sven




More information about the Lazarus mailing list