-
RUST연습]Easy Rust 022: Vecs코딩Coding/Rust연습 2021. 12. 12. 18:12728x90
// Vecs fn main() { let vec_of_ten = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; // Everthing is the same as above except we added vec!. let three_to_five = &vec_of_ten[2..5]; let start_at_two = &vec_of_ten[1..]; let end_at_five = &vec_of_ten[..5]; let everything = &vec_of_ten[..]; println!( " Three to five: {:?},\n start at two: {:?},\n end at five: {:?},\n everything: {:?}", three_to_five, start_at_two, end_at_five, everything ); }
출처 :
https://www.youtube.com/watch?v=Eh-DsRnDKmw&list=PLfllocyHVgsRwLkTAhG0E-2QxCf-ozBkk&index=22
저의 Rust 온라인 스승님 입니다
Rust 스승님 강의 보는 법
Rust 한글 강의 -Easy Rust최고(Rust 강좌) -
https://economiceco.tistory.com/m/11716
★★★Rust Tutorials 로드맵(Road Map)첫시작!-★★★(총정리)Rustacean이 되어 보자!!Let's go! - https://economiceco.tistory.com/m/8614
Rust 코딩(프로그래밍)과 글로벌 경제를 다루고 있는
저의 유튜브 소개합니다
https://youtube.com/channel/UCxFbmi4TjYxvFhnHulX1v-Q
반응형'코딩Coding > Rust연습' 카테고리의 다른 글
Rust연습]자연수 유니코드ℕ Unicode번호(16진수)알아보기 (0) 2022.03.23 Rust연습-curves_rs::canvas,pixel by (0) 2022.02.03 Rust연습]Easy Rust 024: Control flow 1(match+if) (0) 2021.12.12 [Rust연습]Easy Rust 024: Control flow 1(if, else if, else) (0) 2021.12.12 RUST연습]변수 사이즈크기 알아보기(use std::mem::size_of;) (0) 2021.12.10 Rust연습]Shadowing (0) 2021.12.09 RUST연습]Rust Crash Course | Rustlang -44:47부터 (0) 2021.12.07 Rust☆]Understanding ☆Ownership☆ in Rust&☆The Rules of References☆ (0) 2021.12.06