Function take_while
fn take_while<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) that matches the predicate.
The parser will return the longest slice that matches the given predicate (a function that takes the input and returns a bool).
Example
# use ;
use take_while;
use AsChar;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;