Here you can find the source of normalizeIndex(String input, String[] indexList)
public static String normalizeIndex(String input, String[] indexList) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.text.Normalizer; import java.text.Normalizer.Form; import java.util.Arrays; public class Main { public static String normalizeIndex(String input, String[] indexList) throws IOException { String normalizedStr = Normalizer.normalize(input, Form.NFKD).toUpperCase(); normalizedStr = normalizedStr.substring(0, 1); // if (Character.isLetterOrDigit(normalizedStr.charAt(0))){ // return normalizedStr.substring(0,1); // } if (Arrays.asList(indexList).contains(normalizedStr)) { return normalizedStr; } else {//w ww. jav a 2 s .com return "Char"; } } }