1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
use Lazy;
use Value;
use HashSet;
/// Static set of fullwidth CJK Unified Ideographs.
///
/// This set includes commonly used Chinese characters (Hanzi),
/// based on the contents of `cjk_unified.json`, embedded at compile time.
///
/// Used internally by the width engine to determine whether
/// a grapheme should be rendered as double-width in terminal environments.
static CJK_SET: = new;
/// Returns `true` if the given grapheme is a fullwidth CJK Unified Ideograph.
///
/// This check is based on a static hash set populated from
/// `cjk_unified.json`. The match is exact and reflects characters
/// considered double-width in East Asian terminals.
///
/// # Arguments
///
/// * `g` - A grapheme cluster (typically a single CJK character)
///
/// # Returns
///
/// `true` if the grapheme is in the CJK fullwidth set.
pub