How would I split a string to include the separators?
Lets say I had a string such as...
let myString = "apple banana orange grapes" If I used
let separatedString = myString.componentsSeparatedByString(" ") my resulting array would be
["apple","banana","orange","grapes"] How would I achieve a result of
["apple ","banana ","orange ","grapes"]