Klaus
jbnizet
println(listOf("Zuhause", "รl", "Auto", "Bank") .sortedWith(Collator.getInstance(Locale.GERMAN)))
val collator = Collator.getInstance(Locale("de", "DE")) val sorted = filtered.sortedWith(compareBy(collator) { it.title })
nkiesel
filtered.map { collator.getCollationKey(it) }.sorted().map { it.sourceString }
fun Iterable<String>.sortedWith(collator: Collator) = this.map { collator.getCollationKey(it) }.sorted().map { it.sourceString }
filtered.sortedWith(collator)
A modern programming language that makes developers happier.