rust/src/test/ui/str-concat.rs
2019-07-27 18:56:16 +03:00

10 lines
231 B
Rust

// run-pass
pub fn main() {
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_bytes()[9], 'd' as u8);
}