for theChar in s.characters {
//something
}
效率:
for i in 0..<s.characters.count {
let theChar = s[s.index(s.startIndex, offsetBy: i)]
//something
}
效率:
for theChar in s.characters {
//something
}
效率:
for i in 0..<s.characters.count {
let theChar = s[s.index(s.startIndex, offsetBy: i)]
//something
}
效率: