str_concat

Macro str_concat 

Source
macro_rules! str_concat {
    ($($arg:expr),+) => { ... };
}
Expand description

Macro to concatenate multiple strings. Allocates the needed capacity and adds the stings. All strings are borrowed. Example: let s: String = str_concat!(&s1, &s2, &s3); The arguments are string slices (&str). The number of arguments can be 2 or more. Example: fn main() { let s1: String = “string1”.to_owned(); let s2: String = “string2”.to_owned(); let s3: String = “string3”.to_owned(); let result1: String = str_concat!(&s1, &s2, &s3); let result2: String = str_concat!(&s1, “string2”, &s3); }