Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasdev/0dd7fa02b28e9128bb1e90dfdf4a1e20 to your computer and use it in GitHub Desktop.
Save jasdev/0dd7fa02b28e9128bb1e90dfdf4a1e20 to your computer and use it in GitHub Desktop.
CharacterSet StringLiteralConvertible
extension CharacterSet: StringLiteralConvertible, ExtendedGraphemeClusterLiteralConvertible {
public init(stringLiteral value: String) {
self.init(charactersIn: value)
}
public init(extendedGraphemeClusterLiteral value: ExtendedGraphemeClusterType) {
self.init(charactersIn: value)
}
public init(unicodeScalarLiteral value: UnicodeScalarType) {
self.init(charactersIn: value)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment