是否有一种简洁的方式来转换 char
到了 String
在Rust除了:
let mut s = String::new();
s.push('c');
是否有一种简洁的方式来转换 char
到了 String
在Rust除了:
let mut s = String::new();
s.push('c');
你用的是 to_string()
方法:
'c'.to_string()
你用的是 to_string()
方法:
'c'.to_string()