Here you can find the source of stripAccents(final String s)
Remove accents
Parameter | Description |
---|---|
s | a parameter |
private static String stripAccents(final String s)
//package com.java2s; //License from project: Apache License import java.text.Normalizer; public class Main { /**/* w w w . j a v a2 s . c o m*/ * <p> * Remove accents * </p> * * @param s * @return */ private static String stripAccents(final String s) { return Normalizer.normalize(s, Normalizer.Form.NFD).replaceAll("[\\p{InCombiningDiacriticalMarks}]", ""); } /** * <p> * normalize a string * </p> * * @param s * @return */ public static String normalize(final String s) { return stripAccents(String.valueOf(s.toLowerCase())); } }