<- Back to Blog

Tool Update - Sort Lines is adding natural ordering

Ben Maddox ยท Tuesday, December 5, 2023

The tool Sort lines is useful already. However, I wanted to add a nicer sorting approach. Natural ordering helps when sorting things that are a mix of letters and numbers. With just alphabetic, you could start with this


1
2
3
100
101

and it would sort it to this.


1
100
101
2
3

But that isn't what I usually want. If there are numbers, I want them to be sorted like this.


1
2
3
100
101

Also, if we have a mix of letters and numbers, I would want something that would sort like this.


File1
File2
File3
File100
File101
Output1
Output2

Have a great day!
Ben Maddox