LazySplitSequence
public struct LazySplitSequence <Base: Collection>: IteratorProtocol, LazySequenceProtocol where
Base.Iterator.Element: Equatable,
Base.SubSequence: Collection
A sequence from splitting a Collection lazily.
-
Undocumented
Declaration
Swift
public fileprivate(set) var remaining: Base.SubSequence? -
Undocumented
Declaration
Swift
public let separator: Base.Iterator.Element -
Undocumented
Declaration
Swift
public let allowEmptySlices: Bool -
Creates a lazy sequence by splitting a Collection repeatedly.
Declaration
Swift
public init(_ base: Base, separator: Base.Iterator.Element, allowEmptySlices: Bool = false)Parameters
baseThe Collection to split.
separatorThe element of
baseto split over.allowEmptySlicesIf there are two or more separators in a row, or
basebegins or ends with a separator, should empty slices be emitted? Defaults to false. -
The contents of ‘base’ up to the next occurrence of ‘separator’.
Declaration
Swift
public mutating func next() -> Base.SubSequence?
View on GitHub
LazySplitSequence Structure Reference