Sort the string