[][src]Macro nom::tag

macro_rules! tag {
    ($i:expr, $tag: expr) => { ... };
}

tag!(&[T]: nom::AsBytes) => &[T] -> IResult<&[T], &[T]> declares a byte array as a suite to recognize

consumes the recognized characters

Example

 named!(x, tag!("abcd"));
 let r = x(&b"abcdefgh"[..]);
 assert_eq!(r, Ok((&b"efgh"[..], &b"abcd"[..])));