Natural numeric sorting
ultrapasty says:
Hello
I've just added 20 tasks, each one is preceded by it's number -- eg:
1: This
2: That
...
However, when I get to 10 it goes like this:
10: This
11: That
1: Blah
2: Blah
I'd like it if the numbers were naturally sorted, in a similar fashion to the effect that php's natsort() function produces.
Thanks, and loving RTM. Don't know how I managed without it ;)
I've just added 20 tasks, each one is preceded by it's number -- eg:
1: This
2: That
...
However, when I get to 10 it goes like this:
10: This
11: That
1: Blah
2: Blah
I'd like it if the numbers were naturally sorted, in a similar fashion to the effect that php's natsort() function produces.
Thanks, and loving RTM. Don't know how I managed without it ;)
rakesh says:
I know you asked for the natsort similar function.
But a workround would be to number the single digit tasks with a preceeding zero. Eg: 01, 02, 03.
This should sort the numbers after '10' the way you want them to be sorted.
But a workround would be to number the single digit tasks with a preceeding zero. Eg: 01, 02, 03.
This should sort the numbers after '10' the way you want them to be sorted.
ultrapasty says:
That would be an acceptable workaround -- I'll use that for now :)
emily (Remember The Milk) says:
Sounds interesting -- we'll check into how natsort() works. From a quick glance so far, it sounds like it would make sense to sort something like this.