[Geany-devel] [patch] Improved documents list sorting
Thomas Martitz
thomas.martitz at xxxxx
Mon Apr 26 13:52:17 UTC 2010
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.
Best regards.
[1]: http://sourcefrog.net/projects/natsort/
More information about the Devel
mailing list