Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initials ¶
获取所有汉字的首字母组合, 比如"长城ABC",返回"CCABC" -keepSpecial 保留特殊符号
Example ¶
package main import ( "fmt" "gitee.com/go-better/dev/type/text/pinyin" ) func main() { fmt.Println(pinyin.Initials("长大", false)) fmt.Println(pinyin.Initials("长城abc", false)) fmt.Println(pinyin.Initials(" A长b大°,c ", true)) }
Output: ZD CCABC AZBD°,C
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.