Macro static_str_ops::static_concat
source · macro_rules! static_concat { () => { ... }; ($($arg: expr),* $(,)?) => { ... }; }
Expand description
Concatenates the given string literals into a single static string slice.
Examples
use static_str_ops::static_concat;
let hello_world: &'static str = static_concat!("Hello", ", ", "world!");
assert_eq!(hello_world, "Hello, world!");
Panics
This macro will panic if any of the input expressions is not a string literal.