I have got a list of strings that contain special characters.
For example:
["Geben", "Zurück", "Über", "Äpfel"]
I need to sort this list in Kotlin to have the following output:
Ascending: ["Äpfel", "Geben", "Über", "Zurück"]
Descending: ["Zurück", "Über", "Geben", "Äpfel"]
How to do this?
Edit:
Using sortedBy gives the following output which is not desired:
["Geben", "Zurück", "Äpfel", "Über"]