to_string()
2022/2/19 14:35:00
fn main() {
let s : &str = "Hello, world";
let string1 = s.to_string();
let string2 = "world hello".to_string();
let i = 1;
let string3 = i.to_string();
let string4 = 2.to_string();
println!("{}", string1); //Hello, world
println!("{}", string2); //world hello
println!("{}", string3); //1
println!("{}", string4); //2
}