feat: add single file string.rs

This commit is contained in:
2020-12-29 23:49:15 +08:00
parent c49f432208
commit 6386371a69

View File

@@ -0,0 +1,11 @@
fn main() {
let mut hello = String::from("hello");
hello.remove(3);
println!("removed : {}", hello);
hello.pop();
println!("poped : {}", hello);
hello.truncate(1);
println!("truncated: {}", hello);
hello.clear();
println!("cleared : {}", hello);
}