-
rust연습]10진수 숫자 16진수로 알아보는 방법& 16진수를 10진수 숫자로 알아보는 방법코딩Coding/Rust연습 2022. 4. 17. 23:36728x90
10 진수 숫자 16진수로 알아보는 방법
fn main() { let i = 128150; println!("{i:x?}"); }
결과1f496
16 진수 숫자 10 진수로 알아보는 방법
use std::i64; fn main() { let z = i64::from_str_radix("1F496", 16); println!("{:?}", z); }
결과
Ok(128150)
출처 : https://stackoverflow.com/questions/32381414/converting-a-hexadecimal-string-to-a-decimal-integerConverting a hexadecimal string to a decimal integer
I'm writing a Rust program that reads off of an I2C bus and saves the data. When I read the I2C bus, I get hex values like 0x11, 0x22, etc. Right now, I can only handle this as a string and save i...
stackoverflow.com
Rust]유니코드 출력하는 방법
Unicode print -
https://economiceco.tistory.com/m/13235Rust]유니코드 출력하는 방법 Unicode print
Rust 로 유니 코드 출력하는 방법 되게 쉽다 ㅋㅋㅋ // unicode print fn main() { println!("\u{1f640}"); println!("\u{1f63b}"); } 결과 Running `target/debug/testrust` 🙀 😻 출처 : 프로그..
economiceco.tistory.com
반응형'코딩Coding > Rust연습' 카테고리의 다른 글
Rust연습]Cow part2 (0) 2022.04.19 Rust연습] cow_빨라서 최고borrow에서 적극 활용하자 (0) 2022.04.19 rust연습]vec벡터 끼리 합치기 + vec + vec append (0) 2022.04.18 rust연습]u8_sting_stack저장하기bytes() / std::str (0) 2022.04.18 rust연습] pi(𝜋)파이 1억자리까지 계산 하기 (0) 2022.04.16 Rust연습] 섀도 변수 y를 생성하는 match 표현식 (0) 2022.04.11 Rust연습] Some(String) Some(_) 연습 (0) 2022.04.11 rust 연습] iter(), zip() 연습 (0) 2022.04.11