text_fx/
lib.rs

1//! # text-fx
2//!
3//! A collection of text processing utilities for Rust, including string escaping, quoting, hashing, Unicode presentation width, similarity metrics, in-place transformations, and robust UTF-8 iteration.
4//!
5//! ## Modules
6//!
7//! - [`escape`] — String escaping utilities.
8//! - [`hash`] — String hashing functions.
9//! - [`presentation`] — Unicode display width calculations.
10//! - [`quote`] — Quoting and escaping for diagnostics or serialization.
11//! - [`similarity`] — String similarity metrics (e.g., fstrcmp).
12//! - [`transform`] — In-place string transformations for C-style strings.
13//! - [`utf8`] — Robust UTF-8 iteration over possibly-invalid byte slices.
14//!
15//! ## Example
16//!
17//! ```rust
18//! use text_fx::presentation::display_width;
19//! assert_eq!(display_width("你好"), 4);
20//! ```
21
22pub mod escape;
23pub mod hash;
24pub mod presentation;
25pub mod quote;
26pub mod similarity;
27pub mod style;
28pub mod transform;
29pub mod utf8;
30
31#[cfg(test)]
32mod tests {
33    use super::*;
34
35    #[test]
36    fn it_works() {
37        let result = 4;
38        assert_eq!(result, 4);
39    }
40}