uncased

Crates.iouncased
lib.rsuncased
version0.9.10
sourcesrc
created_at2020-09-06 12:17:56.215109
updated_at2024-01-22 23:58:04.575341
descriptionCase-preserving, ASCII case-insensitive, no_std string types.
homepage
repositoryhttps://github.com/SergioBenitez/uncased
max_upload_size
id285395
size39,760
Sergio Benitez (SergioBenitez)

documentation

https://docs.rs/uncased/0.9

README

uncased   crates.io docs.rs

Case-preserving, ASCII case-insensitive no_std string types.

An uncased string is case-preserving. That is, the string itself contains cased characters, but comparison (including ordering, equality, and hashing) is ASCII case-insensitive.

use uncased::UncasedStr;

let x: &UncasedStr = "hello!".into();
let y: &UncasedStr = "HelLo!".into();

assert_eq!(x, y);
assert_eq!(x.as_str(), "hello!");
assert_eq!(y.as_str(), "HelLo!");

See the documentation for detailed usage information.

Usage

Add the following to your Cargo.toml:

[dependencies]
uncased = "0.9"

This crate is #![no_std] compatible. By default, the alloc feature is enabled, which enables the Uncased type but requires alloc support. To disable the feature, disable this crate's default features:

[dependencies]
uncased = { version = "0.9", default-features = false }

Note: This crate does not perform Unicode case-folding. For Unicode case-folding, see unicase.

License

uncased is licensed under either of the following, at your option:

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in uncased by you shall be dual licensed as above without any additional terms or conditions.

Commit count: 23

cargo fmt