StringInterpolation
public struct StringInterpolation : StringInterpolationProtocol
The string interpolation type used by Text
that property encodes Variable
values.
-
Creates a string interpolation with storage pre-sized for a literal with the indicated attributes.
Do not call this initializer directly. It is used by the compiler when interpreting string interpolations.
Declaration
Swift
public init(literalCapacity: Int, interpolationCount: Int)
-
Appends a literal segment of a string interpolation.
Attention
Do not call this method directly. It is used by the compiler when interpreting string interpolations.Declaration
Swift
public mutating func appendLiteral(_ literal: String)
-
Interpolates the given variable’s runtime value into the string literal being created.
Attention
Do not call this method directly. It is used by the compiler when interpreting string interpolations.Declaration
Swift
public mutating func appendInterpolation(_ variable: Variable)
-
Interpolates the given value’s textual representation into the string literal being created.
Attention
Do not call this method directly. It is used by the compiler when interpreting string interpolations.Declaration
Swift
public mutating func appendInterpolation<T>(literal value: T)