public interface PinYinApi
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getChineseAscii(String chineseString)
将中文字符串转移为ASCII码
|
String |
getChineseStringFirstLetterUpper(String chineseString)
将文字转为汉语拼音,取每个字的第一个字母大写
例如:你好 => NH
|
String |
getLastnameFirstLetterUpper(String lastnameChines)
获取姓氏的首字母大写
百家姓涉及到多音字的,都配置在properties中,优先读取properties中的映射
例如:张 -> Z
例如:单 -> S
|
String |
parseEveryPinyinFirstLetter(String chinesString)
将中文字符串转化为汉语拼音,取每个字的首字母
例如:中国人 -> zgr
|
String |
parsePinyinString(String chineseString)
获取汉字字符串的全拼拼音
例如:中国人 -> zhongguoren
|
String getLastnameFirstLetterUpper(String lastnameChines)
百家姓涉及到多音字的,都配置在properties中,优先读取properties中的映射
例如:张 -> Z 例如:单 -> S
lastnameChines - 中文姓氏String getChineseStringFirstLetterUpper(String chineseString)
例如:你好 => NH
chineseString - 中文字符串String parsePinyinString(String chineseString)
例如:中国人 -> zhongguoren
chineseString - 中文字符串String parseEveryPinyinFirstLetter(String chinesString)
例如:中国人 -> zgr
chinesString - 中文字符串Copyright © 2021. All rights reserved.