Swift Remova o espaço da corda
let freedSpaceString = str.filter {!$0.isWhitespace}
Adventurous Anteater
let freedSpaceString = str.filter {!$0.isWhitespace}
let str = " Taylor Swift "
let trimmed = str.trimmingCharacters(in: .whitespacesAndNewlines) // prints "Taylor Swift"