记录笔记: 根据一段字符串,输出该字符串中的中文首字母
eg: Stirng name = “中文名称”; 输出: zwmc
如图所示:
ChineseCharToEn工具类代码如下:
package com.zqy.demodrift.chineseCharToEn;
/**
* @author Tom
*/
import java.io.UnsupportedEncodingException;
/**
* 取得给定汉字串的首字母串,即声母串
* Title: ChineseCharToEn
* @date 注:只支持GB2312字符集中的汉字
*/
public final class ChineseCharToEn {
private final static int[] li_SecPosValue = {
1601, 1637, 1833, 2078, 2274,
2302, 2433, 2594, 2787, 3106, 3212, 3472, 3635, 3722, 3730, 3858,
4027, 4086, 4390, 4558, 4684, 4925, 5249, 5590 };
private fina