iterates over the original range's elements, but ends when the specified predicate becomes true. If the original range is a
forward range orhigher, this range will be a forward range.
Until!(pred, Range, Sentinel) until(alias pred = "a == b", Range, Sentinel)(Range range, Sentinel sentinel, OpenRight openRight = Yes.openRight) if (!is(Sentinel == OpenRight))Lazily iterates range _until the element e for which pred(e, sentinel) is true.
This is similar to takeWhile in other languages.
pred | Predicate to determine when to stop. |
range | The input range to iterate over. |
sentinel | The element to stop at. |
openRight | Determines whether the element for which the given predicate is true should be included in the resulting range (No.openRight), or not (Yes.openRight). |
iterates over the original range's elements, but ends when the specified predicate becomes true. If the original range is a
forward range orhigher, this range will be a forward range.