Skip to main content

uncurses/unicode/
mod.rs

1//! Unicode text primitives.
2//!
3//! Low-level Unicode operations shared across the crate, independent of any
4//! cell, style, or terminal concern. Today this is grapheme-cluster
5//! segmentation; future Unicode helpers (normalization, property lookups, and
6//! the like) belong here too.
7//!
8//! ## Backends
9//!
10//! Segmentation has two interchangeable backends, selected by Cargo features:
11//!
12//! - `unicode-rs` (default): a small pure-Rust UAX #29 implementation.
13//! - `icu`: ICU4X-backed, faster on emoji/ZWJ-heavy text at the cost of a
14//!   larger binary, and takes precedence when both features are enabled.
15//!
16//! At least one of the two must be enabled; the crate root emits a
17//! `compile_error!` otherwise. Both honour Unicode extended grapheme clusters.
18
19mod segment;
20
21pub use segment::graphemes;