#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

6 releases

0.1.5 Nov 4, 2022
0.1.4 Mar 19, 2022
0.1.3 Oct 16, 2021
0.1.2 Apr 22, 2021
0.1.1 Aug 14, 2020

#195 in Text processing

Download history 524/week @ 2022-10-13 968/week @ 2022-10-20 1092/week @ 2022-10-27 711/week @ 2022-11-03 997/week @ 2022-11-10 301/week @ 2022-11-17 257/week @ 2022-11-24 450/week @ 2022-12-01 709/week @ 2022-12-08 1251/week @ 2022-12-15 1273/week @ 2022-12-22 661/week @ 2022-12-29 885/week @ 2023-01-05 1076/week @ 2023-01-12 809/week @ 2023-01-19 597/week @ 2023-01-26

3,535 downloads per month
Used in 11 crates (4 directly)

MIT license

67KB
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.

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

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

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

Given a character, determine whether it is in CJK.

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.

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

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

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

Given a character, determine whether it is in CJK.

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

No runtime deps