Function take_till1
fn take_till1<F, I, Error: ParseError<I>>(cond: F) -> impl Parser<I, Output = I, Error = Error>
where
I: Input,
F: Fn(<I as Input>::Item) -> bool
Returns the longest (at least 1) input slice till a predicate is met.
The parser will return the longest slice till the given predicate (a function that takes the input and returns a bool).
Streaming Specific
Streaming version will return a Err::Incomplete(Needed::new(1)) if the match reaches the
end of input or if there was not match.
Example
# use ;
use take_till1;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;