How to implement natural sorting on the alphanumeric array in swift?
In Swift (or most of the programming language), the default method for sorting an array uses lexicographic order. That means string Foo12 does come before the string Foo2.
Example 1 (Lexical Sort):
In most cases, we perform lexical sorting on our ar...
milanpanchal.hashnode.dev2 min read