sorted
Returns a list of all elements sorted according to their natural sort order.
The sort is stable. It means that equal elements preserve their order relative to each other after sorting.
Try the revamped Kotlin docs design →
Try the revamped Kotlin docs design!