Returns the concatenated elements of this sequence of sequences, inserting the given separator between each element.
SDK
- Xcode 8.0+
Framework
- Swift Standard Library
Declaration
Available when Element conforms to Sequence.
Parameters
separator
A sequence to insert between each of this sequence’s elements.
Return Value
The joined sequence of elements.
Discussion
This example shows how an array of [Int]
instances can be joined, using another [Int]
instance as the separator: