Function combine::byte::space [] [src]

pub fn space<I>() -> Space<I> where
    I: Stream<Item = u8>, 

Parses a b' ', b'\t', b'\n' or 'b\'r'.

use combine::Parser;
use combine::byte::space;
assert_eq!(space().parse(&b" "[..]), Ok((b' ', &b""[..])));
assert_eq!(space().parse(&b"  "[..]), Ok((b' ', &b" "[..])));
assert!(space().parse(&b"!"[..]).is_err());
assert!(space().parse(&b""[..]).is_err());