Skip to content

go-zoox/pinyin

Repository files navigation

pinyin - 汉字转拼音

PkgGoDev Build Status Go Report Card Coverage Status GitHub issues Release

Installation

To install the package, run:

go get github.com/go-zoox/pinyin

Getting Started

package main

import (
	"context"

	"github.com/go-zoox/pinyin"
)

func main() {
	fmt.Println(pinyin.String("你好世界"))
	// Output: nihaoshijie

	fmt.Println(pinyin.Slice("你好世界"))
	// Output: [ni hao shi jie]

	fmt.Println(pinyin.Abbr("你好世界"))
	// Output: nhsj
}

License

GoZoox is released under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages