is there a function that gives me for any "variation" of a letter, (like 'à', 'ä', etc) the base letter('a')? Of course i know how to create a function using switch but i'd have to mind every single variation.
Asked
Active
Viewed 108 times
1 Answers
2
you may utilise Apache Common String Utils
for eg:
String accentLetter1 = "ä";
String accentLetter2 = "à";
System.out.println(org.apache.commons.lang3.StringUtils.stripAccents(accentLetter1));
System.out.println(org.apache.commons.lang3.StringUtils.stripAccents(accentLetter2));
displays
a
a
artifact is available in Maven Repository

Sasi Kathimanda
- 1,788
- 3
- 25
- 47