Function glue::combinators::takers::take_until
source ยท pub fn take_until<'a, Skip, Res, Pred, Par>(
predicate: Pred,
callback: Par,
) -> impl Parser<'a, &'a str>Expand description
Run a parser until a predicate is reached and capture the input it parsed.
assert_eq!(
take_until(eoi(), is(digit)).parse("123"),
Ok((
ParserContext {
input: "123",
bounds: 0..3,
},
"123"
))
);