String::from
2022/2/19 5:22:00
文字列リテラルからStringを生成する関数
fn main() {
let s : &str = "Hello, world";
let string1 = String::from(s);
let string2 = String::from("world hello");
println!("{}", string1); //Hello, world
println!("{}", string2); //world hello
}