A type that can be initialized with a string literal.
SDK
- Xcode 8.0+
Framework
- Swift Standard Library
Declaration
Overview
The String
and Static
types conform to the Expressible
protocol. You can initialize a variable or constant of either of these types using a string literal of any length.
Conforming to ExpressibleByStringLiteral
To add Expressible
conformance to your custom type, implement the required initializer.