[removed] natural sort of alphanumerical strings

后端 未结 7 1500
抹茶落季
抹茶落季 2020-11-21 10:19

I\'m looking for the easiest way to sort an array that consists of numbers and text, and a combination of these.

E.g.

\'123asd\'
\'19asd\'
\'12345asd\'         


        
7条回答
  •  梦如初夏
    2020-11-21 10:29

    So you need a natural sort ?

    If so, than maybe this script by Brian Huisman based on David koelle's work would be what you need.

    It seems like Brian Huisman's solution is now directly hosted on David Koelle's blog:

    • Brian Huisman's javascript solutions
    • David koelle's article on the subject

提交回复
热议问题