Registry / utility / pinyin

pinyin

JSON →
library0.11.0rscratesunverified

Convert Chinese characters to pinyin (phonetic romanization).

# Cargo.toml [dependencies] pinyin = "0.11.0"
INSTALL
IMPORT
SIG · PINYIN
P
pinyin
utilityrustv0.11.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ToPinyin
use pinyin::ToPinyin;

Convert a Chinese string to pinyin syllables.

use pinyin::ToPinyin; fn main() { let s = "中文"; for pinyin in s.to_pinyin() { if let Some(p) = pinyin { println!("{}", p.plain()); } } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.11.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
pinyin — cargo add pinyin · libregistry