[][src]Macro nom::take_until_either

macro_rules! take_until_either {
    ($input:expr, $arr:expr) => { ... };
}

take_until_either!(tag) => &[T] -> IResult<&[T], &[T]> consumes data until it finds any of the specified characters

The remainder still contains the tag. (As opposed to take_until_either_and_consume! which removes it from the remainder.)

Example

 named!(x, take_until_either!("012"));
 let r = x(&b"abcd2efgh"[..]);
 assert_eq!(r, Ok((&b"2efgh"[..], &b"abcd"[..])));