// 演示按空格分割
//单一分隔符:只有一种分割符
var myString = "Berlin Paris New York San Francisco"
//1.隐式定义字符串数组
var myArray = myString.componentsSeparatedByString(" ")
//2.显示定义字符串数组
var myArray2 : [String] = myString.componentsSeparatedByString(" ")
for em in myArray2 {
print(em) //Berlin Paris New York San
}
//print(myArray)