Join array elements using separator


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


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

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

var str = a.joinWithSeparator(":")


Heard the news?

The Swift Cookbook for Swift 3 is at last here! For iBooks, Kindle and Paperback.
Hurry up - and Check it out! ;-)