Split a string by another string


I have a String and I want to split it, by using another string, into an array of sub-strings.


// String literals
let s = "Hello World"

// Split it by "o"
var a = s.componentsSeparatedByString("o")

Heard the news?

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