Skip to content

super1207/to_bopomofo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

to_bopomofo

Converts a pinyin string to a Bopomofo string

install

cargo add to_bopomofo

use

use to_bopomofo::to_bopomofo;

fn main() {
    let bopomofo1 = to_bopomofo("ni");
    println!("bopomofo:{bopomofo1:?}"); // bopomofo:Some("ㄋㄧ")
    let bopomofo2 = to_bopomofo("wrong pinyin");
    println!("bopomofo:{bopomofo2:?}"); // bopomofo:None
}

About

Converts a pinyin string to a Bopomofo string.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages