unicode-blocks

Crates.iounicode-blocks
lib.rsunicode-blocks
version0.1.9
sourcesrc
created_at2020-08-14 08:12:11.310897
updated_at2024-02-18 12:42:26.476061
descriptionThis crate contains a list of all unicode blocks and provides some functions to search across them.
homepagehttps://magiclen.org/unicode-blocks
repositoryhttps://github.com/magiclen/unicode-blocks
max_upload_size
id276507
size68,590
Magic Len (Ron Li) (magiclen)

documentation

README

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

Commit count: 12

cargo fmt