Here you can find the source of collapse(char c)
public static final char collapse(char c)
//package com.java2s; public class Main { private static char[] diacritics = new char[0x300]; public static final char collapse(char c) { if (c >= diacritics.length) { return c; }/*from www. j av a 2 s . c o m*/ char tc = diacritics[c]; return (tc == 0) ? c : tc; } public static final String collapse(String s) { char[] chars = s.toCharArray(); int count = chars.length; for (int i = 0; i < count; ++i) { chars[i] = collapse(chars[i]); } return new String(chars, 0, count); } }