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