Macro tinystr::tinystr16[][src]

macro_rules! tinystr16 {
    ($s:literal) => { ... };
}

Macro to create a const TinyStr8, validated with zero runtime cost.

The argument must be a string literal: https://doc.rust-lang.org/reference/tokens.html#string-literals

Example

use tinystr::{tinystr16, TinyStr16};

const S1: TinyStr16 = tinystr16!("longer-string");
let s2: TinyStr16 = "longer-string".parse().unwrap();
assert_eq!(S1, s2);