Answers for "how to concatenate two &str in rust"

2

how to concatenate two &str in rust

// using 2 variables
let new_string = format!("{}{}", first_string, second_string);
// using 2 literals
let new_string = format!("{}{}", "first string ", "second string");
Posted by: Guest on March-18-2021

Code answers related to "how to concatenate two &str in rust"

Browse Popular Code Answers by Language