Function nom::combinator::rest_len[][src]

pub fn rest_len<T, E: ParseError<T>>(input: T) -> IResult<T, usize, E> where
    T: Slice<Range<usize>> + Slice<RangeFrom<usize>> + Slice<RangeTo<usize>>,
    T: InputLength

Return the length of the remaining input

use nom::combinator::rest_len;
assert_eq!(rest_len::<_,(_, ErrorKind)>("abc"), Ok(("abc", 3)));
assert_eq!(rest_len::<_,(_, ErrorKind)>(""), Ok(("", 0)));