pinyin

package
v0.0.0-...-5a547ea Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2018 License: MIT Imports: 6 Imported by: 1

README

pinyin

Documentation

Index

Constants

View Source
const DefaultBufSize = 4096

Variables

View Source
var EILSEQ = syscall.Errno(C.EILSEQ)

Functions

func Utf8ToGbk

func Utf8ToGbk(s string) (string, error)

Types

type Iconv

type Iconv struct {
	Handle C.iconv_t
}

func Open

func Open(tocode string, fromcode string) (cd Iconv, err error)

Open returns a conversion descriptor cd, cd contains a conversion state and can not be used in multiple threads simultaneously.

func (Iconv) Close

func (cd Iconv) Close() error

func (Iconv) Conv

func (cd Iconv) Conv(b []byte, outbuf []byte) (out []byte, inleft int, err error)

func (Iconv) ConvString

func (cd Iconv) ConvString(s string) string

func (Iconv) Do

func (cd Iconv) Do(inbuf []byte, in int, outbuf []byte) (out, inleft int, err error)

func (Iconv) DoWrite

func (cd Iconv) DoWrite(w io.Writer, inbuf []byte, in int, outbuf []byte) (inleft int, err error)

type Pinyin

type Pinyin struct {
	Split string
	Upper bool
}

func New

func New() Pinyin

func (*Pinyin) Convert

func (c *Pinyin) Convert(s string) (string, error)

func (*Pinyin) GbkToPinyin

func (c *Pinyin) GbkToPinyin(gbk string) []string

Jump to

Keyboard shortcuts

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