cheetah_string/
lib.rs

1#![cfg_attr(not(feature = "std"), no_std)]
2
3//! No more relying solely on the standard library's String! CheetahString is a versatile string type that can store static strings, dynamic strings, and byte arrays.
4//! It is usable in both `std` and `no_std` environments. Additionally, CheetahString supports serde for serialization and deserialization.
5//! CheetahString also supports the `bytes` feature, allowing conversion to the `bytes::Bytes` type.
6//! This reduces memory allocations during cloning, enhancing performance.
7//! example:
8//! ```rust
9//! use cheetah_string::CheetahString;
10//!
11//!
12//!  let s = CheetahString::from("Hello, world!");
13//!
14//!  let s2:&'static str = "Hello, world!";
15//!  let s3 = CheetahString::from_static_str(s2);
16//!
17//!  let s4 = CheetahString::new();
18//!
19//! ```
20//!
21mod cheetah_string;
22
23#[cfg(feature = "serde")]
24mod serde;
25
26pub use cheetah_string::CheetahString;