Natural sorting

arch.jpgThe joys of real world data…

I received a file today with building floors: 1st, 2nd, 3rd, all the way to 22nd… Regular sorting quickly got me nowhere, with results that started 10th, 11th, 12th, 13th, 14th, 15th, 16th, 17th, 18th, 19th, 1st, 22nd, etc.

This led to my discovery of the most marvellous natsort package – easy peasy quick solution, love it!

Comments are closed.

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: