focaccia

Function ascii_casecmp

Source
pub fn ascii_casecmp(left: &[u8], right: &[u8]) -> Ordering
Expand description

Compare two byte strings with ASCII case folding.

This function is implemented with ASCII folding functions in Rust core.

ยงExamples

assert_eq!(ascii_casecmp(b"Artichoke Ruby", b"artichoke ruby"), Ordering::Equal);
assert_eq!(ascii_casecmp(b"artichoke ruby", b"Artichoke"), Ordering::Greater);