Macro display_utils::concat[][src]

macro_rules! concat {
    () => { ... };
    ($e:expr $(,)?) => { ... };
    ($e:expr $(,$rest:expr)+ $(,)?) => { ... };
}

Concatenate arbitrarily many instances of different types.

Note: there is also the concat() function, which works with iterators of same-type objects.

assert_eq!(concat!().to_string(), "");
assert_eq!(concat!("0").to_string(), "0");
assert_eq!(concat!("0", 1).to_string(), "01");
assert_eq!(concat!("0", 1, '2').to_string(), "012");
assert_eq!(concat!("0", 1, '2', String::from("3")).to_string(), "0123");