I have a String
array
let myArray = ["b", "a", "*", "c", "5"]
I want tot sort it. After the sort, sorted letters should be first and symbols and number should follow.
let sortedArray = myArray.sorted { $0 < $1 }
print(sortedArray)
//I get ["*", "5", "a", "b", "c"]
//I want ["a", "b", "c", "5", "*"]
EDIT: I saw this Answer. Is there any short/better way?