Program that sorts a string array by length in Swift.
1) Sort by length ascending
2) Sort by length descending
3) Sort by length ascending and lexicographically
(!) ATTENTION: Since at the time that I made this code…
The final version of Swift 3 was NOT released yet…
you may experience some minor errors in the syntax when testing this code!!!
Try Swift online:
Like and share. It’s FREE too 🙂
Download source code at:
Follow us on Facebook
Amazon Lumberyard Game Engine