| Crates.io | hangul |
| lib.rs | hangul |
| version | 0.1.3 |
| created_at | 2019-07-11 02:35:04.886262+00 |
| updated_at | 2019-10-25 16:22:56.888431+00 |
| description | Utilities to manipulate Hangul Syllables |
| homepage | |
| repository | https://github.com/YujinGaya/hangul |
| max_upload_size | |
| id | 148206 |
| size | 17,478 |
Utilities to manipulate Hangul Syllables.
Hangul is a library to manipulate Hangul Syllables in the Rust language.
Hangul is an extension trait implemented for the primitive type char. Currently it has following methods:
Predicate checks whether given char is a Hangul Syllable: is_syllable()
Predicate indicates whether the syllable has a jongseong — in other words, closed: is_open(), is_closed()
Getters for choseong, jungseong, jongseong, and jamo: choseong(), jungseong(), jongseong(), to_jamo()
Iterator iterates over jamos consisting a syllable: jamos()
:warning: This crate only deals with Compatibility Jamo: If you need Jamo, file a issue in this repository with your context.
Add hangul as a dependency in your Cargo.toml.
[dependencies]
hangul = "0.1.3"
then import HangulExt trait in your code:
use hangul::HangulExt;
Now you can use methods on char.
use hangul::{HangulExt};
assert_eq!(
"첫사랑"
.chars()
.flat_map(|c| c.jamos().unwrap())
.collect::<String>(),
"ㅊㅓㅅㅅㅏㄹㅏㅇ"
);
See docs.rs
Distributed under the MIT license.