I\'m trying to make an iOS app in Swift that requires me to split a line of text at the first colon (:) of a line. I\'ve tried using the the componentsSeparatedByString meth
let str = "Hello, this is, a, playground"
let splitStringArray = str.split(separator: ",", maxSplits: 1).map(String.init)
print(splitStringArray) // ["Hello", " this is, a, playground"]