const_cstr::const_cstr! [] [src]

macro_rules! const_cstr {
    ($strval:expr) => { ... };
    ($($strname:ident = $strval:expr);+;) => { ... };
    ($(pub $strname:ident = $strval:expr);+;) => { ... };
}

Create a C-compatible string as an rvalue or a const binding. Appends a NUL byte to the passed string.

Multiple const declarations can be created with one invocation, but only with the same visibility (pub or not).

See crate root documentation for example usage.

Note

For logical consistency, the passed string(s) should not contain any NUL bytes. Remember that functions consuming a C-string will only see up to the first NUL byte.