Function combine::skip_count
source · pub fn skip_count<Input, P>(count: usize, parser: P) -> SkipCount<Input, P>where
<Input as StreamOnce>::Error: ParseError<<Input as StreamOnce>::Token, <Input as StreamOnce>::Range, <Input as StreamOnce>::Position>,
Input: Stream,
P: Parser<Input>,
Expand description
Parses parser
from zero up to count
times skipping the output of parser
.
let mut parser = skip_count(2, token(b'a'));
let result = parser.parse(&b"aaab"[..]);
assert_eq!(result, Ok(((), &b"ab"[..])));