O que isso imprime?
let text = "Hello World"
let updated = text
.replacing(
"World",
with: "Swift"
)
print(updated)
Tente no Swift Playground online →
[spoiler title="Solução"]
Resposta:
Hello Swift
Explicação:
replacing retorna uma nova string com as substituições aplicadas.
[/spoiler]

