[Lazarus] UTF8 string compare with correct locale sorting

Lukasz Sokol el.es.cr at gmail.com
Tue Oct 22 11:36:18 CEST 2013


On 22/10/13 09:35, Michael Schnell wrote:
> On 10/22/2013 10:24 AM, Sven Barth wrote:
>> I didn't know until around 1 or 2 years ago that "<" and ">" are supported on strings at all
> 
> Nice try O:-)
> 
> -Michael
> 
> -- 

And (probably) overloaded operators are your friends here?

operator < (S1, S2: UTF8String) b : boolean;
begin
  b := (compareUTF8String(s1, s2, comparemode) < 0)
end;

-L.





More information about the Lazarus mailing list