add String type
This commit is contained in:
@@ -11,6 +11,10 @@ fn main() {
|
||||
let height: f64 = 1.79;
|
||||
let character: char = 'M';
|
||||
let has_driver_license: bool = true;
|
||||
let mut text = "Hello".to_string();
|
||||
text.push_str(" World");
|
||||
let text2 = String::from("Hello world2");
|
||||
println!("{} {}",text,text2);
|
||||
|
||||
//make them mutable by mut modifier
|
||||
let mut middle_name = "Levy";
|
||||
|
||||
Reference in New Issue
Block a user