| 程序包 | 说明 |
|---|---|
| net.sourceforge.pinyin4j |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
PinyinHelper.toHanYuPinyinString(String str,
HanyuPinyinOutputFormat outputFormat,
String separate,
boolean retain) |
static String |
PinyinHelper.toHanYuPinyinString(String str,
HanyuPinyinOutputFormat outputFormat,
String separate,
boolean retain,
boolean firstLetter)
Get a string which all Chinese characters are replaced by corresponding
main (first) Hanyu Pinyin representation.
|
static String[] |
PinyinHelper.toHanyuPinyinStringArray(char ch,
HanyuPinyinOutputFormat outputFormat)
Get all Hanyu Pinyin presentations of a single Chinese character (both
Simplified and Tranditional)
For example,
If the input is '间', the return will be an array with two Hanyu Pinyin strings: "jian1" "jian4" If the input is '李', the return will be an array with single Hanyu Pinyin string: "li3" Special Note: If the return is "none0", that means the input Chinese character is in Unicode CJK talbe, however, it has no pronounciation in Chinese |
static String |
PinyinHelper.toHanYuPinyinStringFirstLetter(String str,
HanyuPinyinOutputFormat outputFormat,
String separate,
boolean retain) |
Copyright © 2016. All Rights Reserved.