Mutable string



examples/ownership/mutable-string/src/main.rs
fn main() {
    let mut name = String::from("Foo");
    println!("{name}");

    name.push_str(" Bar");
    println!("{name}");
}

Foo
Foo Bar