Macro widestring::u32cstr
source · macro_rules! u32cstr { ($text:expr) => { ... }; }
Expand description
Converts a string literal into a const
UTF-32 string slice of type
U32CStr
.
The resulting const
string slice will always be valid UTF-32 and include a nul terminator.
§Examples
use widestring::{u32cstr, U32CStr, U32CString};
const STRING: &U32CStr = u32cstr!("My string");
assert_eq!(U32CString::from_str("My string").unwrap(), STRING);