Skip to content

Instantly share code, notes, and snippets.

@ihcsim
Last active February 2, 2022 19:21
Show Gist options
  • Save ihcsim/e3b5918380f72ed6ee22d07c0a0ec6f3 to your computer and use it in GitHub Desktop.
Save ihcsim/e3b5918380f72ed6ee22d07c0a0ec6f3 to your computer and use it in GitHub Desktop.
fn main() {
let str = "hello".to_string();
println!("original: {}\nupdated: {}", str, append_suffix(str));
}
fn append_suffix(s: String) -> String {
s + " world"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment