[Geany-devel] [patch] Improved documents list sorting
Colomban Wendling
lists.ban at xxxxx
Mon Apr 26 15:17:03 UTC 2010
Thomas Martitz a écrit :
> Am 26.04.2010 15:42, schrieb Colomban Wendling:
>
>
>> Both use g_utf8_collate_key_for_filename() to get a clever sort, which
>> fixes the problem I spoken above, and also sorts 1, 2 and 10 numerically
>> rather than alphabetically - thus we have 1, 2, 10 and not 1, 10, 2.
>>
>
> I'm quite confident you cannot achieve that with strcmp() (1 comes after
> 2 no matter if there's a following 0 or not). You'd need something like
> strnatcmp[1], which we use quite happily in Rockbox since a while, for
> that.
Hum, not sure what you mean… Actually, g_utf8_collate_key_for_filename()
do the trick quite well, supports full UTF-8 and honor locale-specific
rules. I don't see need for a replacement here, do you?
Regards,
Colomban
PS: sorry Thomas for the double post, I messed up with my mail client
and didn't responded to the list…
More information about the Devel
mailing list