Function shrimple_parser::parse_until

source ยท
pub fn parse_until<'input>(
    pred: impl Fn(&char) -> bool
) -> impl Parser<'input, &'input str>
Expand description

Strips characters from the input until pred returns true, i.e. while it returns false, returns the string spanning the stripped characters.

The rest of the input, will still have the character on which pred returned true. See also parse_while, parse_until_ex This parser never returns an error, if pred returns false for all the characters in the input, then the output is the entire input, and the rest of the input is an empty string.