winnow::combinatorFunction rest_len
Source pub fn rest_len<I, E: ParserError<I>>(input: &mut I) -> PResult<usize, E>
Expand description
Return the length of the remaining input.
Note: this does not advance the Stream
ยงExample
use winnow::combinator::rest_len;
assert_eq!(rest_len::<_,InputError<_>>.parse_peek("abc"), Ok(("abc", 3)));
assert_eq!(rest_len::<_,InputError<_>>.parse_peek(""), Ok(("", 0)));