0.4.0 May 17, 2022
0.3.3 Jan 31, 2022
0.3.0 Nov 1, 2021

#45 in #icu4x

Download history 664/week @ 2023-12-23 1579/week @ 2023-12-30 901/week @ 2024-01-06 2061/week @ 2024-01-13 1335/week @ 2024-01-20 3051/week @ 2024-01-27 2065/week @ 2024-02-03 2468/week @ 2024-02-10 789/week @ 2024-02-17 1905/week @ 2024-02-24 1789/week @ 2024-03-02 2679/week @ 2024-03-09 1473/week @ 2024-03-16 2645/week @ 2024-03-23 1166/week @ 2024-03-30 2138/week @ 2024-04-06

8,029 downloads per month
Used in 2 crates (via icu_provider_uprops)

Custom license

1MB
13K 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

~0.6–1.1MB
~25K SLoC