macro_rules! u16str { ($text : expr) => { ... }; }
Converts a string literal into a const UTF-16 string slice of type U16Str.
const
U16Str
The resulting const string slice will always be valid UTF-16.
use widestring::{u16str, U16Str, U16String}; const STRING: &U16Str = u16str!("My string"); assert_eq!(U16String::from_str("My string"), STRING);