normalize(String s, java.text.Normalizer.Form.NFD);
import java.text.Normalizer;
public class Main {
public static void main(String args[]) throws Exception {
System.out.println(formatString(""));
}
public static String formatString(String s) {
String temp = Normalizer.normalize(s, Normalizer.Form.NFD);
return temp.replaceAll("[^\\p{ASCII}]", "");
}
}
Related examples in the same category