코딩Coding/Rust연습
rust연습]vec벡터 끼리 합치기 + vec + vec append
내인생PLUS
2022. 4. 18. 01:46
728x90
fn main() {
let mut vec = vec![1, 2, 3];
let mut my_vec2 = vec![236, 149, 136, 235, 133, 149, 32];
vec.append(&mut my_vec2);
println!("{vec:?}");
}
결과
[1, 2, 3, 236, 149, 136, 235, 133, 149, 32]
https://doc.rust-lang.org/std/vec/struct.Vec.html
반응형