macro_rules! cstr {
($s:literal) => { ... };
}
Expand description
Creates a new CStr
using a string literal. A null byte is automatically appended at the end
of that literal, ensuring the safety of the operation.
let s = sentinel::cstr!("Hello, World!");
assert_eq!(s, b"Hello, World!");