Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static String removeAccents(String s) {
- if (s == null) {
- return null;
- }
- StringBuilder sb = new StringBuilder(s);
- for(int i = 0; i < s.length(); i++) {
- Character c = MAP_NORM.get(sb.charAt(i));
- if(c != null) {
- switch (c)
- {
- case 'ยด':
- case '`':
- case '^':
- case '~':
- case 'ยจ':
- continue;
- }
- sb.setCharAt(i, c.charValue());
- }
- }
- return sb.toString();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement