Last active
          January 11, 2017 14:18 
        
      - 
      
- 
        Save panicbit/7d83e87f678d3ff68fec05ab8fbaadb9 to your computer and use it in GitHub Desktop. 
    Invert UTF8 QR-Codes
  
        
  
    
      This file contains hidden or 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
    
  
  
    
  | #![feature(io)] | |
| use std::io::{stdin,Read}; | |
| fn translate(ch: char) -> char { | |
| match ch { | |
| ' ' => '█', | |
| '█' => ' ', | |
| '▀' => '▄', | |
| '▄' => '▀', | |
| _ => ch, | |
| } | |
| } | |
| fn main() { | |
| for ch in stdin().chars() { | |
| print!("{}", translate(ch.unwrap())); | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment