Created
November 17, 2021 14:06
-
-
Save sergiandreplace/d61fe49ffadc55161a0e6e1ea7debd47 to your computer and use it in GitHub Desktop.
Remove accents
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private val accentRegex = Regex("\\p{InCombiningDiacriticalMarks}+") | |
Normalizer.normalize("camión", Normalizer.Form.NFD) | |
.replace(accentRegex, "") | |
.toLowerCase(Locale.getDefault()) | |
.split(" ") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment