📅  最后修改于: 2022-03-11 14:53:32.257000             🧑  作者: Mango
val list = arrayOf("abc", "d", "efghi", "jklm")
val sorted = list.sortedBy { it.length } //sort by length ascending
//sorted: ["d", "abc", "jklm", "efghi"]