SHARE
TWEET

Untitled

a guest May 23rd, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn main() {
  2.    // string
  3.    let text = "Hello sir!";
  4.    // iterator over chars
  5.    let mut bank = text.chars();
  6.    loop {
  7.        let byte = bank.next();
  8.        match byte {
  9.            Some(ch) => println!("Got Ch! {}", ch),
  10.            None => break
  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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top