Created
December 11, 2018 18:28
-
-
Save rust-play/ad23545a55c4ce251ab72fc2c70911c5 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let cat = '😻'; // U+1F63B // UTF8: F0 9F 98 BB | |
println!("val {} {:x?}", cat, cat as i32); | |
let cat_str = String::from("😻"); | |
let cat_bytes = cat_str.as_bytes(); | |
println!("val {} {:x?}", cat_str, cat_bytes); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment