mirror of
https://github.com/jrpie/Launcher.git
synced 2025-02-23 06:21:31 +01:00
fix #37: treat all letters as letters, not just [a-z]
This commit is contained in:
parent
6d1e4a3780
commit
95e7b58c42
1 changed files with 2 additions and 2 deletions
|
@ -186,10 +186,10 @@ class AppsRecyclerAdapter(
|
|||
.lowercase(Locale.ROOT)
|
||||
.toCharArray()
|
||||
.distinct()
|
||||
.filter { c -> !((c in 'a'..'z') || (c in '0'..'9')) }
|
||||
.filter { c -> !c.isLetter() }
|
||||
.map { c -> escapeReplacement(c.toString()) }
|
||||
.fold("") { x, y -> x + y }
|
||||
var disallowedCharsRegex = "[^a-z0-9$allowedSpecialCharacters]".toRegex()
|
||||
var disallowedCharsRegex = "[^\\p{L}$allowedSpecialCharacters]".toRegex()
|
||||
|
||||
fun normalize(text: String): String {
|
||||
return text.lowercase(Locale.ROOT).replace(disallowedCharsRegex, "")
|
||||
|
|
Loading…
Add table
Reference in a new issue