#hangul #unicode #unicode-text #text

unic-ucd-hangul

UNIC — Unicode Character Database — Hangul Syllable Composition & Decomposition

2 unstable releases

0.9.0 Mar 3, 2019
0.8.0 Jan 2, 2019

#460 in Internationalization (i18n)

Download history 1971/week @ 2024-07-20 2072/week @ 2024-07-27 2290/week @ 2024-08-03 2456/week @ 2024-08-10 2171/week @ 2024-08-17 2265/week @ 2024-08-24 1928/week @ 2024-08-31 2540/week @ 2024-09-07 1458/week @ 2024-09-14 1947/week @ 2024-09-21 1435/week @ 2024-09-28 1519/week @ 2024-10-05 2205/week @ 2024-10-12 2122/week @ 2024-10-19 1759/week @ 2024-10-26 2044/week @ 2024-11-02

8,390 downloads per month
Used in 35 crates (3 directly)

MIT/Apache

14KB
91 lines

UNIC — Unicode Character Database — Hangul Syllable Composition & Decomposition

Crates.io Documentation

This UCD component provides algorithms described in Unicode® Standard - 3.12 Conjoining Jamo Behavior, used for detecting, composing and decomposing Hangul syllables.


lib.rs:

UNIC - UCD - Hangul Syllable Composition & Decomposition

This UCD component provides algorithms described in Unicode® Standard - 3.12 Conjoining Jamo Behavior, used for detecting, composing and decomposing Hangul syllables.

Examples


let sample_hangul = '';
assert!(is_syllable(sample_hangul));

let mut decomposed = vec![];
{
    let mut collect_decomposed = |chr| {
        decomposed.push(chr);
    };
    decompose_syllable(sample_hangul, &mut collect_decomposed);
}
assert_eq!(decomposed, ['', '', '']);

let composed_lv = compose_syllable(decomposed[0], decomposed[1]).unwrap();
let composed = compose_syllable(composed_lv, decomposed[2]).unwrap();
assert_eq!(composed, sample_hangul);

Dependencies