daily pastebin goal
80%
SHARE
TWEET

Untitled

a guest Jan 20th, 2019 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn main() {
  2.     let bytes = vec![
  3.         vec![72, 69, 76, 76, 79],
  4.         vec![69, 65, 82, 84, 72, 76, 73, 78, 71, 83]
  5.     ];
  6.     for i in 0..bytes.len() {
  7.         let string = std::str::from_utf8(&bytes[i]).expect("not UTF-8 data");
  8.         match string {
  9.             "HELLO" => println!("Greetings"),
  10.             _ => println!("Hello {}", string),
  11.         }
  12.     }
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top