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: Linus Nielsen Feltzing <linus_at_haxx.se>
Date: Thu, 19 Mar 2009 15:55:41 +0100

Bryan VanDyke wrote:
> 1. Numbers sort before Non-numbers.
> - Leading zeros are striped. A leading zero on a zero is still zero.
> - 000 becomes 0.
> - Some of the code that has been used has trouble with this.
> 2. Lesser number before greater.
> - 1,2,3,4 etc
> 3. Anything else strcmp.

Sounds simple and sane, and seems to be the way Windows Explorer works
as well.

Linus
Received on 2009-03-19


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