macro_rules! str_cat {
(@stack $input:ident, $additional:ident; $($values_coerced:ident)*;) => { ... };
(@stack $input:ident, $additional:ident; $($values_coerced:ident)*; $head:expr, $($tail:expr,)*) => { ... };
($input:expr; $($el:expr),+ $(,)?) => { ... };
($($el:expr),+ $(,)?) => { ... };
}Expand description
Concatenate strings for a String.
It requires all elements to be able to dereference to str (impl Deref<Target = str>).
ยงExample
use str_cat::str_cat;
let mut s = str_cat!("Hello", " ", "World", "!");
assert_eq!(s, "Hello World!");
// Reusing allocation.
s.clear();
str_cat!(&mut s; "foo", "bar");
assert_eq!(s, "foobar");