Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #17]Add doc for cheetah_string mod #18

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
#![cfg_attr(not(feature = "std"), no_std)]

//! 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.
//! It is usable in both `std` and `no_std` environments. Additionally, CheetahString supports serde for serialization and deserialization.
//! CheetahString also supports the `bytes` feature, allowing conversion to the `bytes::Bytes` type.
//! This reduces memory allocations during cloning, enhancing performance.
//! example:
//! ```rust
//! use cheetah_string::CheetahString;
//!
//!
//! let s = CheetahString::from("Hello, world!");
//!
//! let s2:&'static str = "Hello, world!";
//! let s3 = CheetahString::from_static_str(s2);
//!
//! let s4 = CheetahString::new();
//!
//! ```
//!
mod cheetah_string;

#[cfg(feature = "serde")]
Expand Down
Loading