This crate contains a list of all unicode blocks and provides some functions to search across them.
-
all
– Include an array that contains references to all unicode blocks.As this takes quite a bit of memory (approx 2.6k on a 64bit system) this is turned off by default.
assert_eq!(
unicode_blocks::BASIC_LATIN,
unicode_blocks::find_unicode_block('A').unwrap()
);
assert!(
unicode_blocks::is_cjk_block(unicode_blocks::CJK_UNIFIED_IDEOGRAPHS)
);
assert!(unicode_blocks::is_cjk('。'));