Join array elements using separator

 Problem

I have an array and want to join its elements in a string, using a specific separator.



 Recipe


// Initialize the Array
var a = ["one", "two", "three"]

// Join array elements 
// using ':' as separator

var str = a.joinWithSeparator(":")
print(str)

				


 Playground