Created
August 8, 2018 07:51
-
-
Save edwardean/404ec95f9b4a154c23c4c437ee58d6c2 to your computer and use it in GitHub Desktop.
String移除所有空白
This file contains hidden or 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
extension String { | |
func removingWhitespaces() -> String { | |
return components(separatedBy: .whitespaces).joined() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment