pinyin_zhuyin

Crates.iopinyin_zhuyin
lib.rspinyin_zhuyin
version0.2.0
sourcesrc
created_at2017-12-23 03:46:35.792607
updated_at2023-06-11 04:29:57.965666
descriptionConvert between pinyin forms and zhuyin
homepage
repositoryhttps://github.com/gnuish/pinyin-zhuyin
max_upload_size
id44100
size29,529
(gnuish)

documentation

README

pinyin_zhuyin

A library to convert between pinyin and zhuyin.

The original library is Bomin Zhang's Go library "zhuyin".

https://github.com/localvar/zhuyin (Golang version)

https://github.com/DictPedia/ZhuyinPinyin (PHP version)

Usage

Add this to your Cargo.toml:

[dependencies]
pinyin_zhuyin = "0.2"

API

encode_pinyin("zhang1") // zhāng
decode_pinyin("zhāng") // zhang1

encode_zhuyin("zhang1") // ㄓㄤ
decode_zhuyin("ㄓㄤ") // zhang1

pinyin_to_zhuyin("zhāng") // ㄓㄤ
zhuyin_to_pinyin("ㄓㄤ") // zhāng

split("zhang1") // ("zh", "ang", 1)
Commit count: 14

cargo fmt