Natural sorted list of files
Dmitry via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Feb 6 21:00:38 PST 2017
On Monday, 6 February 2017 at 18:57:17 UTC, Ali Çehreli wrote:
> I think it's now std.algorithm.chunkBy. Please fix Rosetta
Thank you!
I fixed, but anyway it works incorrect (it doesn't any changes):
Code: https://rosettacode.org/wiki/Natural_sorting#D
Result: http://pastebin.com/hhSB4Vpn
like this:
["foo1000bar99baz10.txt", "foo1000bar99baz9.txt",
"foo100bar10baz0.txt", "foo100bar99baz0.txt"]
["foo1000bar99baz10.txt", "foo1000bar99baz9.txt",
"foo100bar10baz0.txt", "foo100bar99baz0.txt"]
but must be this:
["foo100bar99baz0.txt", "foo100bar10baz0.txt",
"foo1000bar99baz10.txt", "foo1000bar99baz9.txt"]
["foo100bar10baz0.txt", "foo100bar99baz0.txt",
"foo1000bar99baz9.txt", "foo1000bar99baz10.txt"]
More information about the Digitalmars-d-learn
mailing list