split 字串
發表於 : 週五 12月 11, 2015 2:42 pm
代碼: 選擇全部
let data = "a b c d e"
let b = data.componentsSeparatedByString(" ")
print(b) // ["a", "b", "c", "d", "e"]
代碼: 選擇全部
let data = "a b c d e"
let b = data.componentsSeparatedByString(" ")
print(b) // ["a", "b", "c", "d", "e"]