Advertisement
cwchen

[Rust] Concatenating two Rust string objects

Aug 26th, 2017
725
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.13 KB | None | 0 0
  1. fn main() {
  2.     let s1 = String::from("Hello ");
  3.     let s2 = String::from("World");
  4.  
  5.     assert_eq!(s1 + &s2, "Hello World");
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement