Macro tagua_parser::itag
[−]
[src]
macro_rules! itag { ($input:expr, $string:expr) => { ... }; }
itag!(&[T]: nom::AsBytes) => &[T] -> Result<&[T], &[T]>
declares a case-insensitive ASCII array as a suite to recognize.
It is pretty similar to the nom tag!
macro except it is case-insensitive
and only accepts ASCII characters so far.
It does not return the consumed data but the expected data (the first argument).
Examples
use tagua_parser::Result; named!( test<&str>, itag!("foobar") ); let output = Result::Done(&b""[..], "foobar"); assert_eq!(test(&b"foobar"[..]), output); assert_eq!(test(&b"FoObAr"[..]), output);