#hangul #unicode #unic #text

unic-ucd-hangul

UNIC — Unicode 字符数据库 — 汉字音节组合与分解

2 个不稳定版本

0.9.0 2019 年 3 月 3 日
0.8.0 2019 年 1 月 2 日

404国际化 (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 每月下载量
用于 33 个 crates (3 个直接使用)

MIT/Apache

14KB
91

UNIC — Unicode 字符数据库 — 汉字音节组合与分解

Crates.io Documentation

此 UCD 组件提供了在 Unicode® 标准 - 3.12 连接音节行为 中描述的算法,用于检测、组合和分解韩文字节。


lib.rs:

UNIC - UCD - 汉字音节组合与分解

此 UCD 组件提供了在 Unicode® 标准 - 3.12 连接音节行为 中描述的算法,用于检测、组合和分解韩文字节。

示例


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);

依赖项