After casually scouring the internet an afternoon for a method of sorting strings in a natural order, rather than an alphabetical one, I found the few implementations around lacking. Some ignored decimal numbers. Others included decimal numbers but ignored locale differences — e.g. different decimal points in different locales. Additionally, although it doesn’t appear in Wikipedia’s article on natural sorting, I also want my natural sort to ignore both case and, selectively, white space. I argue that follows if the goal is being a more “human friendly” way of sorting.
After a comment from someone whose name shall remain as anonymous as it is my brother’s, I added support for sorting grouped numbers (e.g. 1,000,000).
Since testing is all the rage I created and published the project to GitHub.