Skip to content

Instantly share code, notes, and snippets.

@jeremiegirault
Created December 4, 2015 10:21
Show Gist options
  • Save jeremiegirault/76a9550ec73afe8fd4c7 to your computer and use it in GitHub Desktop.
Save jeremiegirault/76a9550ec73afe8fd4c7 to your computer and use it in GitHub Desktop.
Protocol retrofitting for constrained generic extension in swift
let myString: String? = …
if myString?.isEmpty ?? true { … }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment