Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: how is strnatcmp aka "Interpret numbers while sorting" supposed to sort?

Re: how is strnatcmp aka "Interpret numbers while sorting" supposed to sort?

From: Paul Louden <paulthenerd_at_gmail.com>
Date: Wed, 18 Mar 2009 17:12:27 -0500

Al Le wrote:
>
> Yes, it's easier because it's a simple rule. If the browsers use a
> complicated logic (which may change with a release) how would you
> describe this for Rockbox? "It does it like BrowserX"? The next
> question would be then "and how does BrowserX do it"? I'd rather have
> an "absolute" than a "relative" definition.
We already have an absolute: ASCII sort.

Our "natural" sorting is entirely a mishmash of rules as to how numbers
should be treated, and other characters.

For example, is "1.001" one point zero zero one, or disk one track one,
or one thousand and one?

If we make up our own non-standard way, yes, we can describe it. We can
a few paragraphs in the manual detailing how people can expect their
files to be sorted, since no other program does it like we do. Or we can
use a "standard" way, describe it in the manual anyway, and have most
people *not* need to look it up in the manual because the list is the
same as they usually see.

I don't see why "we can describe it" is a reason to use our own method -
we can describe methods we get the code for from elsewhere too.
Received on 2009-03-18


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa