Created
February 8, 2020 18:21
-
-
Save ebadiere/21fbe29e747398d79dc53dd375921b72 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![allow(unused_variables)] | |
fn main() { | |
let mut s = String::from("hello"); | |
s.push_str(", world!"); // push_str() appends a literal to a String | |
println!("{}", s); // This will print `hello, world!` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment