Function glue::combinators::finders::find

source ยท
pub fn find<'a, Res, Par, Rep>(
    range: Rep,
    callback: Par,
) -> impl Parser<'a, Vec<Res>>
where Par: Parser<'a, Res>, Rep: RangeBounds<usize>,
Expand description

Run a parser a minimum number of times and up to a maximum and capture its results.

assert_eq!(find(1..2, is("foo")).parse("foofoobar"), Ok((
    ParserContext {
        input: "foofoobar",
        bounds: 3..6
    },
    vec!["foo", "foo"],
)));