[][src]Macro nom::take_until_either1

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

take_until_either1!(tag) => &[T] -> IResult<&[T], &[T]> consumes data (at least one byte) 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"[..])));