基于 pinyin4j 的汉语拼音工具类
Type | Name and description |
---|---|
static String |
cn2InitialSpell(String chinese, boolean h) 获得字符串的汉语拼音首字母 |
static List<String> |
cn2InitialSpells(String chinese, boolean h) 获得字符串的汉语拼音首字母组合列表 |
static String |
cn2Spell(String chinese) 获得字符串的汉语拼音,对于多音字,仅返回第一个 |
static List<String> |
cn2Spells(String chinese) 获得字符串的汉语拼音组合列表 |
Methods inherited from class | Name |
---|---|
class Object |
Object#wait(long), Object#wait(long, int), Object#wait(), Object#equals(Object), Object#toString(), Object#hashCode(), Object#getClass(), Object#notify(), Object#notifyAll() |
获得字符串的汉语拼音首字母
chinese
- 中文字符串h
- 诸如zh的声母,是否返回zh,还是只返回z获得字符串的汉语拼音首字母组合列表
chinese
- 中文字符串h
- 诸如zh的声母,是否返回zh,还是只返回z获得字符串的汉语拼音,对于多音字,仅返回第一个
chinese
- 中文字符串获得字符串的汉语拼音组合列表
chinese
- 中文字符串