Last active
February 28, 2022 20:02
-
-
Save krzyzanowskim/8fe84d54b5422b1048adc96151e3a6cb to your computer and use it in GitHub Desktop.
Check whether CharacterSet contains Character
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 CharacterSet { | |
/// Check whether CharacterSet contains Character | |
func contains(_ character: Character) -> Bool { | |
character.unicodeScalars.allSatisfy(contains) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment