blob: 968c0257b392d53f80ad7a3c39c8da6a55202730 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
fn main() {
let mut s = String::from("howdy");
change_me(&mut s);
let size = get_str_size(&s);
println!("Size of s is {size}");
}
fn get_str_size(s: &String) -> usize {
return s.len();
}
fn change_me(s: &mut String) {
s.push_str(", brilha no curintia");
}
|