Created
April 12, 2019 19:31
-
-
Save ericjkunz/e8c3aefc67e11d060ed0a54175767716 to your computer and use it in GitHub Desktop.
Checks for nil or empty Optional<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 Optional where Wrapped == String { | |
| var isNilOrEmpy: Bool { | |
| return self?.isEmpty ?? true | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment