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: Thomas Martitz <thomas.martitz_at_fhtw-berlin.de>
Date: Thu, 19 Mar 2009 15:28:43 +0100

Thomas Martitz wrote:
> Dominik Riebeling schrieb:
>> Maybe I've missed such a consensus -- in this case someone please
>> point me to the right direction and ignore this mail :)
>
> After this discussion and the ones in IRC, it seems to me that the
> majority is in favor of ignoring leading zeros. This would also match
> with Nautilus' and Windows Explorer's sorting.
>
> And we can do that. Give that the usual browsers do it that way, it's
> also what the user expects, so it can't be bad. FS#10031 needs
> changing the algorithm anyway.
>
> So, should we do that? It at least seems to be the opinion of most
> people.

Ok, I've implemented ignoring very leading zeros now, and fixed
FS#10031, in my local repo. It could be committed, I think. It seems the
consensus is reached.

Alternatively we can also think about ignoring chars like . and _ (and
possibly more) in the beginning of a file name (e.g. .rockbox is sorted
under r). Just an idea. It doesn't really add complexity, but would
definitely do more than the setting advertises. But, this is also
something windows/nautilus/more do.
Received on 2009-03-19


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