icu_codepointtrie

Crates.ioicu_codepointtrie
lib.rsicu_codepointtrie
version0.4.0
sourcesrc
created_at2021-11-01 23:29:03.223301
updated_at2022-05-17 16:34:13.976392
descriptionAPI for an efficient trie of data for Unicode code points
homepage
repositoryhttps://github.com/unicode-org/icu4x
max_upload_size
id475488
size369,705
icu4x-release (github:unicode-org:icu4x-release)

documentation

README

icu_codepointtrie crates.io

icu_codepointtrie is a utility crate of the ICU4X project.

This component provides a data structure for an time-efficient lookup of values associated to code points.

It is an implementation of the existing ICU4C UCPTrie / ICU4J CodePointTrie API.

Architecture

ICU4X CodePointTrie is designed to provide a read-only view of CodePointTrie data that is exported from ICU4C. Detailed information about the design of the data structure can be found in the documentation for the CodePointTrie struct.

Examples

Querying a CodePointTrie

use icu_codepointtrie::planes;
let trie = planes::get_planes_trie();

assert_eq!(0, trie.get(0x41));  // 'A' as u32
assert_eq!(0, trie.get(0x13E0));  // 'Ꮰ' as u32
assert_eq!(1, trie.get(0x10044));  // '𐁄' as u32

More Information

For more information on development, authorship, contributing etc. please visit ICU4X home page.

Commit count: 3247

cargo fmt