Function idata::consume_char[][src]

pub fn consume_char(chars: Chars) -> Option<(char, Chars)>

Try getting a char from top of a Chars returning the (char, remaining_chars) if possible

  extern crate idata;

  fn main() {
       let chars = "Hello world".chars();
       let (ch, chars) = idata::consume_char(chars).unwrap();

       assert!(ch == 'H');
       assert!(chars.as_str() == "ello world");
  }