2 releases

0.1.1 Nov 10, 2023
0.1.0 Oct 8, 2020

#1759 in Text processing

26 downloads per month

MIT license

30KB
82 lines

hsk

About

Return HSK Level for Simplified Chinese Characters

Usage

extern crate hsk;

use hsk::Hsk;

fn main() {
	let hsk_list = Hsk::new();
	let character: &str = "成为";
	let result: u8 = hsk_list.get_hsk(character);
	println!("{:?}", result); // --> 4
}

Contributors

License

MIT


lib.rs:

About

Return HSK Level for Simplified Chinese Characters

Usage

extern crate hsk;

use hsk::Hsk;

fn main() {
	let hsk_list = Hsk::new();
	let character: &str = "成为";
	let result: u8 = hsk_list.get_hsk(character);
	println!("{:?}", result); // --> 4
}

Dependencies

~335–590KB
~13K SLoC