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 15:56:14 -0000 (UTC)
Thomas Martitz wrote:
> Thomas Martitz wrote:
>> I've found a simpler solution for this. Trying the code raises the
>> following problem:
>> 00 < 0b < 01 < 1
>> Zeros before except the final zeros are ignored, and the final zero
>> before characters is not ignored. But the leading zeros of numbers are
>> (so that 01 is 1). Obviously 0 sorts before 1.
> Nautilus has this problem too. I don't know what windows does in this
I thought we'd already established that those 4 files are in the right order?
Windows orders them as below, which is the same as above:
-- 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