#hangul #unicode #unic #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

#404 in Internationalization (i18n)

Download history 955/week @ 2024-03-14 1400/week @ 2024-03-21 1546/week @ 2024-03-28 1578/week @ 2024-04-04 1713/week @ 2024-04-11 1710/week @ 2024-04-18 1351/week @ 2024-04-25 1525/week @ 2024-05-02 1776/week @ 2024-05-09 1297/week @ 2024-05-16 1454/week @ 2024-05-23 2075/week @ 2024-05-30 1309/week @ 2024-06-06 2202/week @ 2024-06-13 2591/week @ 2024-06-20 1820/week @ 2024-06-27

8,394 downloads per month
Used in 33 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