场景一: 截取某个字符串的前后部分
场景二: 截取指定range的字符串,例如截取第2~5之间字符 cdef
场景三: 以空格、","或某个字符分割为两个数组
let str = "abc def"
let arr = str.split(separator: " ")
print(arr) //["abc", "def"]
//数组元素拼接成新字符串
let joined = arr.joined()//"abcdef"
//数组元素以逗号拼接成新字符串
let joined1 = arr.joined(separator: ",") //"abc,def"