Rockbox mail archiveSubject: 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: Mike Holden <rockbox_at_mikeholden.org>
Date: Thu, 19 Mar 2009 14:53:22 -0000 (UTC)
Thomas Martitz wrote:
Just had a quick look in My Computer on an XP box to see how this does it.
1. 001 sorts before 01 and 01 sorts before 1, giving the conclusion that
2. 1 sorts before 2, 2 before 10, 10 befoer 11 etc, as expected giving
3. 001 sorts before 10 and 010, again giving expected sorting for the
4. Introducing letters into the equation, we can see that 00A sorts before
All of these individual items line up to give a file listing that doesn't
-- Mike Holden http://www.by-ang.com - the place to shop for all manner of hand crafted items, including Jewellery, Greetings Cards and GiftsReceived on 2009-03-19
Page was last modified "Jan 10 2012" The Rockbox Crew