yeslogic-unicode-blocks

Crates.ioyeslogic-unicode-blocks
lib.rsyeslogic-unicode-blocks
version0.2.0
sourcesrc
created_at2024-10-30 00:27:42.943046
updated_at2024-10-30 00:27:42.943046
descriptionFunctions to access and search Unicode blocks.
homepage
repositoryhttps://github.com/yeslogic/unicode-blocks
max_upload_size
id1427797
size71,768
Developers (prince) (github:yeslogic:developers-prince)

documentation

README

yeslogic-unicode-blocks

Build Status Documentation Version Unicode Version License

This is fork of unicode-blocks maintained by YesLogic. Differences from upstream: updated Unicode data, script to regenerate Rust source.


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!(yeslogic_unicode_blocks::BASIC_LATIN, yeslogic_unicode_blocks::find_unicode_block('A').unwrap());

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

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

Given a character, determine whether it is in CJK.

assert!(yeslogic_unicode_blocks::is_cjk('。'));
Commit count: 22

cargo fmt