nom::take_s
[−]
[src]
macro_rules! take_s { ($i:expr, $count:expr) => { ... }; }
take_s!(nb) => &str -> IResult<&str, &str>
generates a parser consuming the specified number of characters
// Desmond parser named!(take5<&str,&str>, take_s!( 5 ) ); let a = "abcdefgh"; assert_eq!(take5(a), Done("fgh", "abcde"));