Function combine::char::space [] [src]

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

Parse a single whitespace according to std::char::is_whitespace.

This includes space characters, tabs and newlines.

use combine::Parser;
use combine::char::space;
assert_eq!(space().parse(" "), Ok((' ', "")));
assert_eq!(space().parse("  "), Ok((' ', " ")));
assert!(space().parse("!").is_err());
assert!(space().parse("").is_err());