Created
October 23, 2020 15:10
-
-
Save tkausch/3f96daced05a680156db20fbae0a028f to your computer and use it in GitHub Desktop.
How to trim whitespace in a string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let str = " Taylor Swift is £!?" | |
let trimmed = str.trimmingCharacters(in: .whitespacesAndNewlines) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment