#unicode #blocks #character #cjk

no-std unicode-blocks

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

4 releases

0.1.3 Oct 16, 2021
0.1.2 Apr 22, 2021
0.1.1 Aug 14, 2020
0.1.0 Aug 14, 2020

#167 in Text processing

Download history 8/week @ 2021-08-10 4/week @ 2021-08-17 8/week @ 2021-08-24 6/week @ 2021-09-07 8/week @ 2021-09-14 2/week @ 2021-09-21 7/week @ 2021-09-28 6/week @ 2021-10-05 23/week @ 2021-10-12 24/week @ 2021-10-19 58/week @ 2021-10-26 20/week @ 2021-11-02 48/week @ 2021-11-09 8/week @ 2021-11-16 17/week @ 2021-11-23

110 downloads per month
Used in 2 crates

MIT license

66KB
2K SLoC

Unicode Blocks

CI

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.

extern crate unicode_blocks;

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

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

extern crate unicode_blocks;

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

Given a character, determine whether it is in CJK.

extern crate unicode_blocks;

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

Crates.io

https://crates.io/crates/unicode-blocks

Documentation

https://docs.rs/unicode-blocks

License

MIT


lib.rs:

Unicode Blocks

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.

extern crate unicode_blocks;

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

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

extern crate unicode_blocks;

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

Given a character, determine whether it is in CJK.

extern crate unicode_blocks;

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

No runtime deps