TakeWhileInclusiveExtension<T> extension

Extends the Stream class with the ability to take events while they pass the condition given and include last event that doesn't pass the condition.

  • Stream<T>


takeWhileInclusive(bool test(T)) → Stream<T>
Emits values emitted by the source Stream so long as each value satisfies the given test. When the test is not satisfied by a value, it will emit this value as a final event and then complete. [...]