protocol
ExpressibleByStringLiteral
Inheritance |
ExpressibleByExtendedGraphemeClusterLiteral, ExpressibleByUnicodeScalarLiteral
View Protocol Hierarchy →
|
---|---|
Associated Types |
A type that can represent a string literal. Valid types for
A type that can represent an extended grapheme cluster literal. Valid types for
A type that can represent a Unicode scalar literal. Valid types for 2 inherited items hidden. (Show all) |
Import |
|
Initializers
Creates an instance initialized to the given string value.
Declaration
init
(
stringLiteral
value
:
Self
.
StringLiteralType
)
Creates an instance initialized to the given value.
Declaration
init
(
extendedGraphemeClusterLiteral
value
:
Self
.
ExtendedGraphemeClusterLiteralType
)
Declared In
ExpressibleByExtendedGraphemeClusterLiteral
Creates an instance initialized to the given value.
Declaration
init
(
unicodeScalarLiteral
value
:
Self
.
UnicodeScalarLiteralType
)
Declared In
ExpressibleByUnicodeScalarLiteral
2 inherited items hidden. (Show all)
A type that can be initialized with a string literal.
The
String
andStaticString
types conform to theExpressibleByStringLiteral
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
ExpressibleByStringLiteral
conformance to your custom type, implement the required initializer.