Created
October 4, 2018 22:08
-
-
Save DanielCardonaRojas/13d66a138d0787a96ac5b40f149b1833 to your computer and use it in GitHub Desktop.
StringExtensions
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 isContainedBy(set: CharacterSet) -> Bool { | |
let letters = self.components(separatedBy: set) | |
print(letters) | |
return self.count == letters.count | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment