Locale-agnostic case conversions by default #KT-43023
This commit is contained in:
@@ -16,7 +16,7 @@ data class Item(val name: String, val rating: Int) : Comparable<Item> {
|
||||
|
||||
@SharedImmutable
|
||||
val STRING_CASE_INSENSITIVE_ORDER: Comparator<String> =
|
||||
compareBy { it: String -> it.toUpperCase() }.thenBy { it.toLowerCase() }.thenBy { it }
|
||||
compareBy { it: String -> it.uppercase() }.thenBy { it.lowercase() }.thenBy { it }
|
||||
|
||||
class OrderingTest {
|
||||
val v1 = Item("wine", 9)
|
||||
|
||||
Reference in New Issue
Block a user