Swift 字符串转数组 2019-03-24 本文已影响0人 kuai空调 怎样把字符串中的每个字符作为数组的元素转换为一个数组呢?其实很简单: let str = "abcdefg" let arr = str.map{ $0 }