1 2 3 4 5 6
use nom::{bytes::complete::take_while, error::ParseError, IResult}; pub fn sp<'a, E: ParseError<&'a str>>(i: &'a str) -> IResult<&'a str, &'a str, E> { let chars = " \t\r\n"; take_while(move |c| chars.contains(c))(i) }