finl_unicode/lib.rs
1//! `finl_unicode` is a crate to provide Unicode support for the finl project. This is not necessarily
2//! meant to be a comoprehensive Unicode support, although I will consider adding additional use cases
3//! as necessary. Unicode 14.0.0 is implemented in the current version.
4//!
5//! Two features are currently supported:
6//! - **Unicode segmentation**. (Specify `clusters` as a feature when importing the crate.) For a peekable iterator of `CharIndices`, we extend that iterator to
7//! include a `next_cluster` method which returns `Option<String>` which will contain the next
8//! grapheme cluster if there is one or `None` if there isn't.
9//! - **Character category**. (Specify `categories` as a feature when importing the crate.) Extends the `char` class with methods for testing the
10//! category of the character.
11//!
12//! The default is to compile all features. Note that the Rust compiler/linker will not automatically
13//! link unused code, so you most of the time, there will be no need to remove features.
14//!
15//! Building the crate runs a build script which connects to unicode.org to download the data files.
16
17#[cfg(feature = "categories")]
18pub mod categories;
19
20#[cfg(feature = "grapheme_clusters")]
21pub mod grapheme_clusters;
22
23mod data;