#iterator #no-alloc

no-std discard-while

Get the first non-matching element, and the amount of discarded elements

7 releases

0.1.6 Apr 16, 2023
0.1.5 Apr 16, 2023

#2911 in Rust patterns

MIT license

7KB

Iterator utility for getting the first non-matching element, discarding any others, and the amount of discarded elements.

To use, either use discard_while::discard_while to get the function, or use discard_while::DiscardWhile to get the convenience trait.

Documentation

This library is free software, you can use and re-use it under the terms of the MIT license. A copy of the license is provided in the source repository in the “LICENSE” file.


lib.rs:

Iterator utility for getting the first non-matching element, discarding any others, and the amount of discarded elements.

To use, either use discard_while::discard_while to get the function, or use discard_while::DiscardWhile to get the convenience trait.

No runtime deps