afterWhere method
Return everything after a condition is met.
1, 2, 3, 4.afterWhere((e) => e.isOdd) returns 2, 3, 4.
Optional skip skips that many occurrences:
1, 2, 3, 4.afterWhere((e) => e.isOdd, skip: 1) returns 4.
reverse counts occurrences from right to left:
1, 2, 3, 4.afterWhere((e) => e.isOdd, reverse: true) returns 4.
includeInResult includes the target element in the result unless all occurrences were skipped:
1, 2, 3, 4.afterWhere((e) => e.isEven, includeInResult: true) returns 2, 3, 4.
Implementation
Queue<E> afterWhere(
bool Function(E e) test, {
int skip = 0,
bool includeInResult = false,
bool reverse = false,
}) {
return h
.afterWhereIterable(
original: this,
test: test,
skip: skip,
reverse: reverse,
includeInResult: includeInResult,
)
.toQueue();
}