#unicode #block #cjk

no-std yeslogic-unicode-blocks

Functions to access and search Unicode blocks

1 unstable release

0.2.0 Oct 30, 2024

#2641 in Text processing

Download history 69/week @ 2025-09-19 92/week @ 2025-09-26 190/week @ 2025-10-03 438/week @ 2025-10-10 337/week @ 2025-10-17 92/week @ 2025-10-24 34/week @ 2025-10-31 129/week @ 2025-11-07 132/week @ 2025-11-14 93/week @ 2025-11-21 49/week @ 2025-11-28 42/week @ 2025-12-05 760/week @ 2025-12-12 46/week @ 2025-12-19 10/week @ 2025-12-26 31/week @ 2026-01-02

849 downloads per month
Used in 3 crates (2 directly)

MIT license

71KB
2K SLoC

yeslogic-unicode-blocks


This is fork of unicode-blocks maintained by YesLogic. Differences from upstream: updated Unicode data, script to regenerate Rust source.


This crate contains a list of all unicode blocks and provides some functions to search across them.

Examples

Given a character, determine what unicode block contains it.

assert_eq!(yeslogic_unicode_blocks::BASIC_LATIN, yeslogic_unicode_blocks::find_unicode_block('A').unwrap());

Given a unicode block, determine whether it is used in CJK.

assert!(yeslogic_unicode_blocks::is_cjk_block(yeslogic_unicode_blocks::CJK_UNIFIED_IDEOGRAPHS));

Given a character, determine whether it is in CJK.

assert!(yeslogic_unicode_blocks::is_cjk(''));

No runtime deps