Created
September 8, 2017 04:58
-
-
Save ezura/eb1f6353fdfc9c23b0bc3dffa27242d0 to your computer and use it in GitHub Desktop.
This file contains 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: CustomStringConvertible { | |
public var description: String { | |
switch self { | |
case .none: | |
return "" | |
case .some(let wrapped): | |
return "\(wrapped)" | |
} | |
} | |
} | |
"\("sss" as Optional)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment