Answers for "remove whitespace from string ios swift"

1

swift remove space from string

let freedSpaceString = str.filter {!$0.isWhitespace}
Posted by: Guest on February-12-2020
0

how to get rid of excess space in swift

let str = "  Taylor Swift  "
let trimmed = str.trimmingCharacters(in: .whitespacesAndNewlines) // prints "Taylor Swift"
Posted by: Guest on May-30-2020

Code answers related to "remove whitespace from string ios swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language