Instance Method

drop(while:)

Omits elements from the upstream publisher until a given closure returns false, before republishing all remaining elements.

Declaration

func drop(while predicate: @escaping (Output) -> Bool) -> Publishers.DropWhile<AnyPublisher<Output, Failure>>

Parameters

predicate

A closure that takes an element as a parameter and returns a Boolean value indicating whether to drop the element from the publisher’s output.

Return Value

A publisher that skips over elements until the provided closure returns false.