Function take_while1
fn take_while1<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 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).
It will return an Err(Err::Error((_, ErrorKind::TakeWhile1))) if the pattern wasn't met.
Example
# use ;
use take_while1;
use AsChar;
assert_eq!;
assert_eq!;
assert_eq!;