Skip to content

Commit

Permalink
Simplify splitting language display name and code
Browse files Browse the repository at this point in the history
  • Loading branch information
nbradbury committed Dec 20, 2024
1 parent 0dbf35b commit 6c20c6a
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,7 @@ object LocaleManager {

for (i in entryStrings.indices) {
// now, we can split the sorted array to extract the display string and the language code
val split = entryStrings[i]
.split("__".toRegex())
.dropLastWhile { it.isEmpty() }
.toTypedArray()
val split = entryStrings[i].split("__")
sortedEntries[i] = split[0]
sortedValues[i] = split[1]
detailStrings[i] =
Expand Down

0 comments on commit 6c20c6a

Please sign in to comment.