String Object
// Creating an empty string object
let my\_string = String::new;
// Converting to a string object
let S\_string = a_string.to\_string()
// Creating an initialized string object
let lang = String::from("Rust");
println!("First language is {lang}");
Comments