-
-
Save vijairaj/92fef6fdc3f60dfb6d653775ea846531 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); | |
} |
Author
vijairaj
commented
Dec 11, 2018
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment