A type that can be initialized with a string literal containing a single Unicode scalar value.
SDK
- Xcode 8.0+
Framework
- Swift Standard Library
Declaration
Overview
The String
, Static
, Character
, and Unicode
types all conform to the Expressible
protocol. You can initialize a variable of any of these types using a string literal that holds a single Unicode scalar.
Conforming to ExpressibleByUnicodeScalarLiteral
To add Expressible
conformance to your custom type, implement the required initializer.