怎樣把字符串中的每個(gè)字符作為數(shù)組的元素轉(zhuǎn)換為一個(gè)數(shù)組呢包各?其實(shí)很簡(jiǎn)單: let str = "abcdefg" let arr = str.map{ $0 }