Function parse_until_ex

Source
pub fn parse_until_ex<In: Input, Reason>(
    pat: impl Pattern,
) -> impl Parser<In, In, Reason>
Expand description

Like parse_until, but also removes the match of pat from the rest of the input.

ยงErrors

Unlike parse_until, this parser returns a recoverable error if pred returned false for all the characters in the input.

Examples found in repository?
examples/xml.rs (line 57)
55fn parse_string<In: Input>(input: In) -> ParsingResult<In, In, Error> {
56    parse('"')
57        .then(parse_until_ex(NotEscaped('\\', '"')).or_reason(Error::UnclosedString))
58        .parse(input)
59}