library

package
v0.0.0-...-81f09a2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2020 License: Apache-2.0 Imports: 2 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToSlice

func ToSlice(s string) []string

转换为字符串数组

Types

type ConvertResult

type ConvertResult string

转换结果

func NewConvertResult

func NewConvertResult(s string) *ConvertResult

创建转换结果对象

func (*ConvertResult) ASCII

func (r *ConvertResult) ASCII() string

ASCII 带数字的声调

func (*ConvertResult) None

func (r *ConvertResult) None() string

None 不带声调输出

func (*ConvertResult) Unicode

func (r *ConvertResult) Unicode() string

Unicode Unicode声调

type Dictionary

type Dictionary struct{}

拼音词典

func NewDict

func NewDict() *Dictionary

新建拼音词典对象

func (*Dictionary) Abbr

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

获取拼音的首字符

func (*Dictionary) Convert

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

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

func (*Dictionary) Name

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

转换人名

func (*Dictionary) Sentence

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

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

Jump to

Keyboard shortcuts

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