pub fn main() {
- let a: String = "hello".to_strbuf();
- let b: String = "world".to_strbuf();
- let s: String = format_strbuf!("{}{}", a, b);
+ let a: String = "hello".to_string();
+ let b: String = "world".to_string();
+ let s: String = format!("{}{}", a, b);
println!("{}", s.clone());
- assert_eq!(s.as_slice()[9], 'd' as u8);
+ assert_eq!(s.as_bytes()[9], 'd' as u8);
}