Type Definition fixedstr::str8

source ·
pub type str8 = tstr<8>;
Expand description

types for small strings that use a more efficient representation underneath. A str8 can hold a string of up to 7 bytes (7 ascii chars). The same functions for fstr and zstr are provided for these types so the documentation for the other types also applies. The size of str8 is 8 bytes.

Example:

 let mut s = str8::from("aλc");
 assert_eq!(s.capacity(),7);
 assert_eq!(s.push("1234567"), "4567");
 assert_eq!(s,"aλc123");
 assert_eq!(s.charlen(), 6);
 assert_eq!(s.len(), 7);