hangeul-rs
Korean alphabet manipulation library for Rust.
It is lightweight, without any unicode libraries.
[dependencies]
hangeul = "0.1.2"
Usage
extern crate hangeul;
fn main() {
let subjective = "피카츄";
let sub_josa = match hangeul::ends_with_jongseong(subjective).unwrap() {
true => "이",
false => "가"
};
let sentence = format!("야생의 {}{} 나타났다!", subjective, sub_josa);
println!("{}", sentence); print_choseong(&sentence); }
fn print_choseong(s:&str) {
for c in s.chars() {
print!("{}", hangeul::get_choseong(c).unwrap_or(c));
}
print!("\n");
}
Documentation
Docs.rs
Why not 'Hangul'?
'Hangul' is from old romanization system - McCune–Reischauer system.
'Hangeul' is official in South Korea, since 2000
License
Distributed under MIT License