[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: The Alphanum Algorithm for Lua
- From: Petite Abeille <petite.abeille@...>
- Date: Tue, 3 Jun 2008 19:15:54 +0200
On Jun 3, 2008, at 7:04 PM, Andrew Wilson wrote:
While trying to do a nice natural sorting style example for Lua based
on site http://www.davekoelle.com/alphanum.html site, I wasn't verify
satisfied with my example,
does anyone have a better method of splitting a string into table of
strings and numbers, than my chunkString function below. I know I'm
missing some simple string.gmatch way of doing it.
FWIW, here is another implementation of the same algorithm:
http://dev.alt.textdrive.com/browser/HTTP/NaturalComparator.lua
Based on Andre Bogus implementation of David Koelle's Alphanum
algorithm:
http://www.davekoelle.com/files/alphanum.lua
--
PA.
http://alt.textdrive.com/nanoki/