#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

#91 in Text processing

Download history 3076/week @ 2024-08-16 3904/week @ 2024-08-23 4269/week @ 2024-08-30 3497/week @ 2024-09-06 3228/week @ 2024-09-13 3870/week @ 2024-09-20 3548/week @ 2024-09-27 4309/week @ 2024-10-04 3915/week @ 2024-10-11 4483/week @ 2024-10-18 3986/week @ 2024-10-25 4472/week @ 2024-11-01 4248/week @ 2024-11-08 4255/week @ 2024-11-15 4107/week @ 2024-11-22 3384/week @ 2024-11-29

16,629 downloads per month
Used in 36 crates (12 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