pinyin

package
v0.0.0-...-1db8920 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2021 License: MIT Imports: 2 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToSlice

func ToSlice(s string) []string

ToSlice 转换为字符串数组

Types

type ConvertResult

type ConvertResult string

ConvertResult 转换结果

func NewConvertResult

func NewConvertResult(s string) *ConvertResult

NewConvertResult 创建转换结果对象

func (*ConvertResult) ASCII

func (r *ConvertResult) ASCII() string

ASCII 带数字的声调 mei3 hao3

func (*ConvertResult) None

func (r *ConvertResult) None() string

None 不带声调输出 mei hao

func (*ConvertResult) Unicode

func (r *ConvertResult) Unicode() string

Unicode Unicode声调 měi hǎo

type Dict

type Dict struct{}

Dict 拼音词典

func NewDict

func NewDict() *Dict

NewDict 新建拼音词典对象

func (*Dict) Abbr

func (p *Dict) Abbr(s string, sep string) string

Abbr 获取拼音的首字符

func (*Dict) Convert

func (p *Dict) Convert(s string, sep string) (result *ConvertResult)

Convert 中文转换为拼音, 不保留标点符号

func (*Dict) Name

func (p *Dict) Name(s string, sep string) (result *ConvertResult)

Name 转换人名

func (*Dict) Sentence

func (p *Dict) Sentence(s string) (result *ConvertResult)

Sentence 中文转换为拼音, 保留标点符号

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL