sortedDescending

Common
JVM
JS
Native
1.0
fun <T : Comparable<T>> Array<out T>.sortedDescending(): List<T>
fun <T : Comparable<T>> Iterable<T>.sortedDescending(): List<T>
fun UIntArray.sortedDescending(): List<UInt>
fun ULongArray.sortedDescending(): List<ULong>
fun UByteArray.sortedDescending(): List<UByte>
fun UShortArray.sortedDescending(): List<UShort>

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

The sort is stable. It means that equal elements preserve their order relative to each other after sorting.

Common
JVM
JS
Native
1.0
fun ByteArray.sortedDescending(): List<Byte>
fun ShortArray.sortedDescending(): List<Short>
fun IntArray.sortedDescending(): List<Int>
fun LongArray.sortedDescending(): List<Long>
fun FloatArray.sortedDescending(): List<Float>
fun DoubleArray.sortedDescending(): List<Double>
fun CharArray.sortedDescending(): List<Char>

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