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