Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

concat

  • concat
fn main() {
    let string1 = String::from("Apple");
    let string2 = String::from("Banana");
    let str3 = "Peach";

    let other = [string1, string2, str3.to_owned()].concat();
    println!("{other}");
}
AppleBananaPeach