Skip to content

Instantly share code, notes, and snippets.

@edenir-anschau
Forked from yanaga/SemAcentoNemCedilha.java
Created February 10, 2016 02:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edenir-anschau/a2fd921bdbb2086cbd02 to your computer and use it in GitHub Desktop.
Save edenir-anschau/a2fd921bdbb2086cbd02 to your computer and use it in GitHub Desktop.
Normalização de Strings em Java
import java.text.Normalizer;
public class SemAcentoNemCedilha {
public static String normalizar(String s) {
return Normalizer.normalize(value, Normalizer.Form.NFD).replaceAll("[^\\p{ASCII}]", "");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment