Coggle requires JavaScript to display documents.
String
format!
let s1 = String::from("tic"); let s2 = String::from("tac"); let s3 = String::from("toe"); let s = format!("{}-{}-{}", s1, s2, s3);
+
add()
let s1 = String::from("hello, "); let s2 = String::from("world"); let s3 = s1 + &s2;
s1
push()
let mut s = String::from("some string"); s.push('x');
push_str()
let mut s = String::from("some string"); s.push_str("append string");
let s = String::from("some string");
let data = "some string"; let s = data.to_string(); let new_s = "some string".to_string();
let mut s = String::new();
for b in "hello".bytes() { println!("{}", b); }
for c in "hello".chars() { println!("{}", c); }
let s = &str[0];
let hello = String::from("some string"); let s = &hello[0..3];
Vec<u8>