struct JoinedSequence.Iterator
Inheritance |
IteratorProtocol
View Protocol Hierarchy →
|
---|---|
Associated Types | |
Import | import Swift |
Initializers
Creates a sequence that presents the elements of base
sequences
concatenated using separator
.
Complexity: O(separator.count
).
Declaration
init<Separator>(base: Base.Iterator, separator: Separator)
Instance Methods
Advances to the next element and returns it, or nil
if no next element
exists.
Once nil
has been returned, all subsequent calls return nil
.
Declaration
mutating func next() -> JoinedSequence<Base>.Iterator.Element?
An iterator that presents the elements of the sequences traversed by a base iterator, concatenated using a given separator.