tinystr 
tinystr is a utility crate of the ICU4X project.
It includes [TinyAsciiStr], a core API for representing small ASCII-only bounded length strings.
It is optimized for operations on strings of size 8 or smaller. When use cases involve comparison
and conversion of strings for lowercase/uppercase/titlecase, or checking
numeric/alphabetic/alphanumeric, TinyAsciiStr is the edge performance library.
Examples
use TinyAsciiStr;
let s1: = "tEsT".parse.expect;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert!;
assert!;
let s2 = try_from_raw
.expect;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert!;
Details
When strings are of size 8 or smaller, the struct transforms the strings as u32/u64 and uses
bitmasking to provide basic string manipulation operations:
is_ascii_numericis_ascii_alphabeticis_ascii_alphanumericto_ascii_lowercaseto_ascii_uppercaseto_ascii_titlecasePartialEq
TinyAsciiStr will fall back to u8 character manipulation for strings of length greater than 8.
More Information
For more information on development, authorship, contributing etc. please visit ICU4X home page.