Naming
This commit is contained in:
parent
7380e8a23e
commit
31a47405df
@ -7,6 +7,7 @@ object NameHelper {
|
|||||||
fun normalize(text: String): String {
|
fun normalize(text: String): String {
|
||||||
val normalized = Normalizer.normalize(text, Normalizer.Form.NFC)
|
val normalized = Normalizer.normalize(text, Normalizer.Form.NFC)
|
||||||
val result = normalized.replace("\\p{M}".toRegex(), "")
|
val result = normalized.replace("\\p{M}".toRegex(), "")
|
||||||
return StringUtils.stripAccents(result)
|
val cleaned = "[^A-Za-z0-9 -]".toRegex().replace(result, "")
|
||||||
|
return StringUtils.stripAccents(cleaned)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user