#unicode-characters #unicode #blocks #character #cjk #block

no-std unicode-blocks

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

10 releases

0.1.9 Feb 18, 2024
0.1.8 Jun 29, 2023
0.1.6 Apr 20, 2023
0.1.5 Nov 4, 2022
0.1.1 Aug 14, 2020

#163 in Text processing

Download history 1399/week @ 2023-12-06 1614/week @ 2023-12-13 1365/week @ 2023-12-20 1749/week @ 2023-12-27 1689/week @ 2024-01-03 2178/week @ 2024-01-10 2095/week @ 2024-01-17 1994/week @ 2024-01-24 1719/week @ 2024-01-31 1498/week @ 2024-02-07 1922/week @ 2024-02-14 2099/week @ 2024-02-21 2490/week @ 2024-02-28 2400/week @ 2024-03-06 2263/week @ 2024-03-13 2010/week @ 2024-03-20

9,609 downloads per month
Used in 18 crates (6 directly)

MIT license

68KB
1.5K SLoC

Unicode Blocks

CI

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

The latest version of Unicode: 15.1.0

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.

The latest version of Unicode: 15.1.0

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