Macro kernel::c_str

source ·
macro_rules! c_str {
    ($str:expr) => { ... };
}
Expand description

Creates a new CStr from a string literal.

The string literal should not contain any NUL bytes.

Examples

const MY_CSTR: &CStr = c_str!("My awesome CStr!");
This documentation is an old archive. Please see https://rust.docs.kernel.org instead.