Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Code shared from the Rust Playground
fn main() {
let message = "“It’s a smart quote!” 😛";
let new_message: String = message
.map(|(i, c)| {
println!("[{:3}] = {:08b} = {:02x} = '{}'", i, c, c, c as char);
c as char
println!("{}", new_message);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.