[−][src]Crate uncased
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!");
Unicode
This crate does not perform Unicode case-folding. For Unicode
case-folding, see unicase
.
Features and no_std
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 }
Structs
Uncased | alloc An uncased (case-preserving), owned or borrowed ASCII string. |
UncasedStr | A cost-free reference to an uncased (case-preserving) ASCII string. This is
typically created from an |
Functions
eq | Returns true if |