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

no-std uncased

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

6 releases

0.9.7 May 17, 2022
0.9.6 Apr 7, 2021
0.9.5 Mar 2, 2021
0.9.4 Feb 25, 2021
0.9.2 Sep 25, 2020

#115 in Text processing

Download history 84167/week @ 2022-11-30 85309/week @ 2022-12-07 82439/week @ 2022-12-14 62150/week @ 2022-12-21 54104/week @ 2022-12-28 88561/week @ 2023-01-04 88409/week @ 2023-01-11 91077/week @ 2023-01-18 97741/week @ 2023-01-25 94453/week @ 2023-02-01 94447/week @ 2023-02-08 97528/week @ 2023-02-15 102961/week @ 2023-02-22 95698/week @ 2023-03-01 108561/week @ 2023-03-08 90071/week @ 2023-03-15

413,835 downloads per month
Used in 457 crates (8 directly)

MIT/Apache

26KB
413 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

~66KB