Function take_till1
fn take_till1<F, I, Error: ParseError<I>>(cond: F) -> impl FnMut(I) -> crate::internal::IResult<I, I, 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).
It will return Err(Err::Error((_, ErrorKind::TakeTill1))) if the input is empty or the
predicate matches the first input.
Example
# use ;
use take_till1;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;