sorted

Common
JVM
JS
Native
1.0
fun <T : Comparable<T>> Array<out T>.sorted(): List<T>
fun ByteArray.sorted(): List<Byte>
fun ShortArray.sorted(): List<Short>
fun IntArray.sorted(): List<Int>
fun LongArray.sorted(): List<Long>
fun FloatArray.sorted(): List<Float>
fun DoubleArray.sorted(): List<Double>
fun CharArray.sorted(): List<Char>
fun <T : Comparable<T>> Iterable<T>.sorted(): List<T>

Returns a list of all elements sorted according to their natural sort order.