#ascii #case-insensitive #no-std #uncased #case-preserving

no-std uncased

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

5 releases

0.9.6 Apr 7, 2021
0.9.5 Mar 2, 2021
0.9.4 Feb 25, 2021
0.9.3 Oct 10, 2020
0.9.2 Sep 25, 2020

#65 in Text processing

Download history 4983/week @ 2020-12-25 3555/week @ 2021-01-01 2951/week @ 2021-01-08 3026/week @ 2021-01-15 3284/week @ 2021-01-22 2742/week @ 2021-01-29 3641/week @ 2021-02-05 3799/week @ 2021-02-12 4039/week @ 2021-02-19 4709/week @ 2021-02-26 4462/week @ 2021-03-05 4210/week @ 2021-03-12 4539/week @ 2021-03-19 4623/week @ 2021-03-26 4722/week @ 2021-04-02 4251/week @ 2021-04-09

16,628 downloads per month
Used in 3 crates (2 directly)

MIT/Apache

25KB
404 lines

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.

Dependencies

~71KB