Take Until

Actions Status

This crate adds the take_until method as an extension for iterators.

Example

Parsing the next base 128 varint from a byte slice.

```rust use take_until::TakeUntilExt;

let varint = &[0b10101100u8, 0b00000010, 0b10000001]; let int: u32 = varint .iter() .takeuntil(|b| (*b & 0b1000_0000) == 0) .enumerate() .fold(0, |acc, (i, b)| { acc | ((b & 0b01111111) as u32) << (i * 7) }); asserteq!(300, int); ```