Function chomp::parsers::skip_while
[−]
[src]
pub fn skip_while<I: Input, F>(i: I, f: F) -> SimpleResult<I, ()> where
F: FnMut(I::Token) -> bool,
Skips over tokens in the input until f
returns false.
use chomp::prelude::{parse_only, skip_while}; assert_eq!(parse_only(|i| skip_while(i, |c| c == b'a'), &b"aaabc"[..]), Ok(()));