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