Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #33410

Re: Java sort

Newsgroups comp.lang.java.programmer
Date 2015-12-28 12:49 -0800
References <ab12b5b7-eab1-4f4a-93c1-3c386d64a7f3@googlegroups.com> <n5s69i$1i5$1@dont-email.me>
Message-ID <e940a654-c6d0-4c24-b66d-dc55f40936db@googlegroups.com> (permalink)
Subject Re: Java sort
From Eric Douglas <e.d.programmer@gmail.com>

Show all headers | View raw


On Monday, December 28, 2015 at 3:35:41 PM UTC-5, Eric Sosman wrote:
>      Nothing that comes in Java's standard stuff, as far as
> I know.  But you might want
> 
> http://sourcefrog.net/projects/natsort/

Is there Java code in that link?  I don't see it.
So far I only found 2 results and they give a different order than Windows, at least the default order for Windows 8.1.
https://github.com/paour/natorder
http://www.davekoelle.com/files/AlphanumComparator.java

That first one even includes an example:
String[] strings = new String[] { "1-2", "1-02", "1-20", "10-20", "fred", "jane", "pic01", "pic2", "pic02", "pic02a", "pic3", "pic4", "pic 4 else", "pic 5", "pic05", "pic 5", "pic 5 something", "pic 6", "pic   7", "pic100", "pic100a", "pic120", "pic121", "pic02000", "tom", "x2-g8", "x2-y7", "x2-y08", "x8-y8" };

Their result:
Sorted: [1-02, 1-2, 1-20, 10-20, fred, jane, pic01, pic02, pic2, pic02a, pic3, pic4, pic 4 else, pic05, pic 5, pic 5, pic 5 something, pic 6, pic   7, pic100, pic100a, pic120, pic121, pic02000, tom, x2-g8, x2-y7, x2-y08, x8-y8]
Windows (I wrote those out as empty files):
[1-02, 1-2, 1-20, 10-20, fred, jane, pic   7, pic 4 else, pic 5, pic 5 something, pic 6, pic01, pic02, pic02a, pic2, pic3, pic4, pic05, pic100, pic100a, pic120, pic121, pic02000, tom, x2-g8, x2-y7, x2-y08, x8-y8]

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Java sort Eric Douglas <e.d.programmer@gmail.com> - 2015-12-28 12:08 -0800
  Re: Java sort Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-12-28 15:35 -0500
    Re: Java sort Eric Douglas <e.d.programmer@gmail.com> - 2015-12-28 12:49 -0800
      Re: Java sort Eric Douglas <e.d.programmer@gmail.com> - 2015-12-28 13:02 -0800
        Re: Java sort Eric Douglas <e.d.programmer@gmail.com> - 2015-12-28 13:16 -0800
          Re: Java sort Arne Vajhøj <arne@vajhoej.dk> - 2015-12-28 22:49 -0500
      Re: Java sort Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-12-28 17:55 -0500
      Re: Java sort leif.roar@dimnakorr.com - 2015-12-29 01:20 -0600
  Re: Java sort Andreas Leitgeb <avl@logic.at> - 2015-12-28 23:17 +0000
    Re: Java sort Eric Douglas <e.d.programmer@gmail.com> - 2015-12-29 05:41 -0800
  Re: Java sort Arne Vajhøj <arne@vajhoej.dk> - 2015-12-28 22:47 -0500
  Re: Java sort Jeff Higgins <jeff@invalid.invalid> - 2015-12-29 15:03 +0000

csiph-web