코딩Coding/★Rust★기초★Syntax
Rust❤How would I store hexedecimal values in a variable?
내인생PLUS
2023. 9. 6. 14:06
728x90
https://users.rust-lang.org/t/how-would-i-store-hexedecimal-values-in-a-variable/45545/6
How would I store hexedecimal values in a variable?
Just to make it explicit in case you don't know. If your value is not provided as string you can write hex-literals directly in your source code, e.g. let dec: u32 = 15; let hex: u32 = 0xF; let bin: u32 = 0b1111; let oct: u32 = 0o17; assert_eq!(dec, hex);
users.rust-lang.org
반응형