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 zstr are provided for these types so the documentation for the other types also applies. The size of str8 is 8 bytes.
Example:
use no_std_strings::str8;
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); All functions and traits for these types mirror those of zstr.
Aliased Type§
pub struct str8 {
chrs: [u8; 8],
}Fields§
§chrs: [u8; 8]