摘要: http://lovecherry.cnblogs.com/archive/2005/09/20/240163.html 阅读全文
posted @ 2011-11-30 16:05 风花雪月 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2011-11-30 14:19 风花雪月 阅读(962) 评论(0) 推荐(0) 编辑