vec_cat

Macro vec_cat 

Source
macro_rules! vec_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 elements for a Vec.

ยงExample

use str_cat::vec_cat;
use std::ffi::OsStr;
use std::path::Path;

let mut s = vec_cat!(b"Hello", b" ", "World".as_bytes(), &[b'!']);
assert_eq!(s, b"Hello World!");

// Reusing allocation.
s.clear();
vec_cat!(&mut s; b"foo", b"bar");
assert_eq!(s, b"foobar");