itération rapide à travers la chaîne
let string = "hello world"
for char in string {
print("character = \(char)")
}
Justin Giffard
let string = "hello world"
for char in string {
print("character = \(char)")
}
let string = "hello world"
string.forEach {
print("character = \(char)")
}
let string = "hello world"
for (index, char) in string.enumerated() {
print("index = \(index), character = \(char)")
}