Documentation
¶
Overview ¶
Code generated by dict2data. DO NOT EDIT.
Code generated by dict2data. DO NOT EDIT.
Code generated by dict2data. DO NOT EDIT.
Index ¶
- func FromStyle(pinyin string) string
- func Initials(str string) string
- func IsHan(han rune) bool
- func Pinyin(str string, options ...Option) []string
- func Pinyins(str string, options ...Option) [][]string
- func Py(str, sep string, options ...Option) string
- func RuneOption(han rune, option Option, index int, runes []rune) []string
- func Style(pinyin string, option Option) string
- func ToPolyphonic(tones []string, han rune, index int, runes []rune) []string
- func ToStrings(pinyin []uint16, option Option) []string
- func ToneIndex(tone string) int
- type Option
- type Polyphonic
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Pinyin ¶
Example ¶
fmt.Println(py.Pinyin("特长")) fmt.Println(py.Pinyin("长相")) fmt.Println(py.Pinyin("阿弥陀佛")) fmt.Println(py.Pinyin("阿弥陀佛", py.Tone)) fmt.Println(py.Pinyin("阿弥陀佛", py.NoTone)) fmt.Println(py.Pinyin("阿弥陀佛", py.Init)) fmt.Println(py.Initials("阿弥陀佛"))
Output: [te4 cha2ng] [zha3ng xia1ng] [a1 mi2 tuo2 fu2] [ā mí tuó fú] [a mi tuo fu] [a m t f] amtf
func RuneOption ¶ added in v1.1.2
func ToPolyphonic ¶ added in v1.1.2
Types ¶
type Polyphonic ¶ added in v1.1.2
Source Files
¶
Click to show internal directories.
Click to hide internal directories.