https://github.com/magiclen/unicode-blocks
This crate contains a list of all unicode blocks and provides some functions to search across them.
https://github.com/magiclen/unicode-blocks
rust unicode
Last synced: 3 months ago
JSON representation
This crate contains a list of all unicode blocks and provides some functions to search across them.
- Host: GitHub
- URL: https://github.com/magiclen/unicode-blocks
- Owner: magiclen
- License: mit
- Created: 2020-08-14T08:08:55.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-18T12:41:57.000Z (over 1 year ago)
- Last Synced: 2025-03-24T17:55:17.865Z (4 months ago)
- Topics: rust, unicode
- Language: Rust
- Homepage:
- Size: 79.1 KB
- Stars: 8
- Watchers: 2
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Unicode Blocks
====================[](https://github.com/magiclen/unicode-blocks/actions/workflows/ci.yml)
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.
```rust
assert_eq!(unicode_blocks::BASIC_LATIN, unicode_blocks::find_unicode_block('A').unwrap());
```#### Given a unicode block, determine whether it is used in CJK.
```rust
assert!(unicode_blocks::is_cjk_block(unicode_blocks::CJK_UNIFIED_IDEOGRAPHS));
```#### Given a character, determine whether it is in CJK.
```rust
assert!(unicode_blocks::is_cjk('。'));
```## Crates.io
https://crates.io/crates/unicode-blocks
## Documentation
https://docs.rs/unicode-blocks
## License
[MIT](LICENSE)