// using 2 variables
let new_string = format!("{}{}", first_string, second_string);
// using 2 literals
let new_string = format!("{}{}", "first string ", "second string");
let text1 = "hello".to_owned();
let text2 = text1 + " world";
println!("{}", text2);
let s = concat!("test", 10, 'b', true); // concatenates string literals
assert_eq!(s, "test10btrue");
fn main() {
let mut string = String::from("Hello");
string.push_str(" World");
println!("{}", string);
}