摘要:
http://lovecherry.cnblogs.com/archive/2005/09/20/240163.html 阅读全文
摘要:
import net.sourceforge.pinyin4j.PinyinHelper;import java.util.regex.Pattern;/** * 拼音工具类,能将汉字转换成拼音的首字母 */public class NameSpellUtil{ /* 用于中文判断的正则表达式 */private static final String regexStr = "[\u4e00-\u9fa5]";/** * 将一个字符串中的汉字转换成拼音首字母、非汉字则不变 * * @param cn * String * @return String */public st 阅读全文