sortedByKeyDescending

inline fun <K, V> Map<K, V>.sortedByKeyDescending(): Map<K, V>

Returns a map of all elements sorted by dec key.

Example:

mapOf(1 to 0, 5 to 1, 10 to 10, 7 to 0).sortedByKeyDescending()
// {10:10, 5:1, 1:0, 7:0}
mapOf(2 to "0", 3 to "11", 4 to "01", 5 to "1").sortedByKeyDescending()
// {3:"11", 5:"1", 4:"01", 2:"0"}

Since

1.1.0