Skip to content

Instantly share code, notes, and snippets.

@ericjkunz
Created April 12, 2019 19:31
Show Gist options
  • Select an option

  • Save ericjkunz/e8c3aefc67e11d060ed0a54175767716 to your computer and use it in GitHub Desktop.

Select an option

Save ericjkunz/e8c3aefc67e11d060ed0a54175767716 to your computer and use it in GitHub Desktop.
Checks for nil or empty Optional<String>
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