aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/src/main/java/com/wireguard/android/model/TunnelComparator.kt
diff options
context:
space:
mode:
Diffstat (limited to 'ui/src/main/java/com/wireguard/android/model/TunnelComparator.kt')
-rw-r--r--ui/src/main/java/com/wireguard/android/model/TunnelComparator.kt4
1 files changed, 1 insertions, 3 deletions
diff --git a/ui/src/main/java/com/wireguard/android/model/TunnelComparator.kt b/ui/src/main/java/com/wireguard/android/model/TunnelComparator.kt
index 9fb96ca..9e72f4e 100644
--- a/ui/src/main/java/com/wireguard/android/model/TunnelComparator.kt
+++ b/ui/src/main/java/com/wireguard/android/model/TunnelComparator.kt
@@ -5,8 +5,6 @@
package com.wireguard.android.model
-import java.util.Locale
-
object TunnelComparator : Comparator<String> {
private class NaturalSortString(originalString: String) {
class NaturalSortToken(val maybeString: String?, val maybeNumber: Int?) : Comparable<NaturalSortToken> {
@@ -29,7 +27,7 @@ object TunnelComparator : Comparator<String> {
val tokens: MutableList<NaturalSortToken> = ArrayList()
init {
- for (s in NATURAL_SORT_DIGIT_FINDER.findAll(originalString.split(WHITESPACE_FINDER).joinToString(" ").toLowerCase(Locale.ENGLISH))) {
+ for (s in NATURAL_SORT_DIGIT_FINDER.findAll(originalString.split(WHITESPACE_FINDER).joinToString(" ").lowercase())) {
try {
val n = s.value.toInt()
tokens.add(NaturalSortToken(null, n))