macro_rules! cstr {
($text:literal) => { ... };
}Expand description
Construct a 'static &CStr. The validitiy will be verified at compile-time.
// A valid literal:
let key: &CStr = cstr!("hello");ⓘ
// A literal with invalid UTF-8 will not compile:
let key: &CStr = cstr!("\xc3\x28");ⓘ
// A literal with an embedded nil will not compile:
let key: &CStr = cstr!("hel\0lo");