LazyCollectionProtocol
protocol LazyCollectionProtocol : Collection, LazySequenceProtocol
-
Creates a lazy sequence by splitting this Collection repeatedly.
- Parameters:
- separator: The element of this collection to split over.
- allowEmptySlices: If there are two or more separators in a row, or this Collection begins or ends with a separator, should empty slices be emitted? Defaults to false.
Declaration
Swift
public func split ( separator: Elements.Iterator.Element, allowEmptySlices: Bool = false ) -> LazySplitSequence<Elements>Parameters
separatorThe element of this collection to split over.
allowEmptySlicesIf there are two or more separators in a row, or this Collection begins or ends with a separator, should empty slices be emitted? Defaults to false.
- Parameters:
View on GitHub
LazyCollectionProtocol Extension Reference