cstr16!() { /* proc-macro */ }
Expand description

Builds a CStr16 literal at compile time from a string literal.

This will throw a compile error if an invalid character is in the passed string.

Example

assert_eq!(cstr16!("test €").to_u16_slice_with_nul(), [116, 101, 115, 116, 32, 8364, 0]);