Function combine::skip_many

source ·
pub fn skip_many<Input, P>(p: P) -> SkipMany<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 p zero or more times ignoring the result.

NOTE: If p can succeed without consuming any input this may hang forever as skip_many will repeatedly use p to parse the same location in the input every time

let result = skip_many(digit())
    .parse("A");
assert_eq!(result, Ok(((), "A")));