Used normalizeString from Commons
This commit is contained in:
parent
e4c47780e4
commit
30e7b68c06
|
@ -767,13 +767,7 @@ fun Context.getLockScreenVisibilityText(type: Int) = getString(
|
||||||
)
|
)
|
||||||
|
|
||||||
fun Context.removeDiacriticsIfNeeded(text: String): String {
|
fun Context.removeDiacriticsIfNeeded(text: String): String {
|
||||||
var msg = text
|
return if (config.useSimpleCharacters) text.normalizeString() else text
|
||||||
if (config.useSimpleCharacters) {
|
|
||||||
msg = Normalizer.normalize(msg, Normalizer.Form.NFD)
|
|
||||||
msg = msg.replace("\\p{InCombiningDiacriticalMarks}+".toRegex(), "")
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Context.getSmsDraft(threadId: Long): String? {
|
fun Context.getSmsDraft(threadId: Long): String? {
|
||||||
|
|
Loading…
Reference in New Issue