pub fn le_i8<I, E>() -> impl Parser<I, Output = i8, Error = E>
Expand description
Recognizes a signed 1 byte integer.
use nom::number::le_i8;
let mut parser = le_i8::<_, (_, ErrorKind)>();
assert_eq!(parser.parse(&b"\x00\x01abcd"[..]), Ok((&b"\x01abcd"[..], 0x00)));
assert_eq!(parser.parse(&b""[..]), Err(Err::Incomplete(Needed::new(1))));