Function winnow::combinator::rest_len

source ·
pub fn rest_len<I, E: ParseError<I>>(input: I) -> IResult<I, usize, E>where
    I: Stream,
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::<_,Error<_>>("abc"), Ok(("abc", 3)));
assert_eq!(rest_len::<_,Error<_>>(""), Ok(("", 0)));