Function take_till
fn take_till<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 input slice (if any) 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_till;
assert_eq!;
assert_eq!; //allowed
assert_eq!;
assert_eq!;