2 releases

0.3.3 Jan 31, 2022
0.3.0 Nov 1, 2021

#142 in Internationalization (i18n)

Download history 6/week @ 2022-01-23 30/week @ 2022-01-30 6/week @ 2022-02-06 18/week @ 2022-02-13 5/week @ 2022-02-20 8/week @ 2022-02-27 6/week @ 2022-03-06 17/week @ 2022-03-13 24/week @ 2022-03-20 2/week @ 2022-03-27 6/week @ 2022-04-03 4/week @ 2022-04-10 37/week @ 2022-04-17 105/week @ 2022-04-24 168/week @ 2022-05-01 134/week @ 2022-05-08

445 downloads per month
Used in 5 crates (3 directly)

Custom license

1.5MB
7.5K SLoC

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.

Dependencies