Expand description
§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);
Constants§
- UNIC component description.
- UNIC component name.
- UNIC component version.
- The Unicode version of data
Functions§
- Compose a pair of Hangul Jamo
- Decompose a precomposed Hangul syllable
- Whether the character is a (precomposed) Hangul Syllable