Java String Accent stripAccents(String input)

Here you can find the source of stripAccents(String input)

Description

Remove all accents of a string

License

Open Source License

Parameter

Parameter Description
input string you want to remove accents

Declaration


public static String stripAccents(String input) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.Normalizer;

public class Main {
    /**//from  www .j a v a  2s  .  c o m
    * Remove all accents of a string
    * @param input string you want to remove accents
    */

    public static String stripAccents(String input) {
        return Normalizer.normalize(input, Normalizer.Form.NFD).replaceAll("\\p{InCombiningDiacriticalMarks}+", "");
    }
}

Related

  1. stripAccents(final String input)
  2. stripAccents(final String input)
  3. stripAccents(final String s)
  4. stripAccents(String input)
  5. stripAccents(String input)
  6. stripAccents(String v)
  7. stripAccentsToLowerCase(String str)
  8. toLatinUnaccented(String s)
  9. toUnaccented(String s)