8 stable releases

2.0.0 Jun 3, 2023
1.2.0 Jun 2, 2023
1.1.3 Mar 28, 2023
1.1.2 Aug 2, 2022
0.1.1 Dec 8, 2017

#191 in Internationalization (i18n)

Download history 4/week @ 2024-11-13 7/week @ 2024-11-20 8/week @ 2024-11-27 17/week @ 2024-12-04 36/week @ 2024-12-11 5/week @ 2024-12-18 3/week @ 2025-01-08 10/week @ 2025-01-15 16/week @ 2025-01-22 3/week @ 2025-01-29 10/week @ 2025-02-05 22/week @ 2025-02-12 7/week @ 2025-02-19 18/week @ 2025-02-26

58 downloads per month
Used in 2 crates

MIT license

7KB
108 lines

prettify_pinyin

About

Turn pinyin written with tone numbers and turn it into pinyin with node marks. prettify_pinyin accepts input in the CC-CEDICT pinyin format (space separated syllables with tone numbers at the end of each syllable), for example: "ni3 hao3" will get turned into "nǐ hǎo".

Usage

use prettify_pinyin::prettify;

let formatted: String = prettify("ma1 ma2 ma3 ma4 ma");

println!("{}", formatted); // --> mā má mǎ mà ma

License

MIT


lib.rs:

About

Turn pinyin written with tone numbers and turn it into pinyin with node marks. prettify_pinyin accepts input in the CC-CEDICT pinyin format (space separated syllables with tone numbers at the end of each syllable), for example: "ni3 hao3" will get turned into "nǐ hǎo".

Usage

use prettify_pinyin::prettify;

let formatted: String = prettify("ma1 ma2 ma3 ma4 ma");

println!("{}", formatted); // --> mā má mǎ mà ma

No runtime deps