Java String Accent stripAccents(String v)

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

Description

strip Accents

License

Open Source License

Declaration

public static String stripAccents(String v) 

Method Source Code


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

import java.text.Normalizer;

public class Main {
    public static String stripAccents(String v) {
        if (v != null) {
            String s = Normalizer.normalize(v, Normalizer.Form.NFD);
            return s.replaceAll("\\p{M}", "");
        } else {//from   w  ww  .  j a  v a2  s  .co m
            return null;
        }
    }
}

Related

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