Contents

appendLiteral(_:)

Appends a literal segment to the interpolation.

Declaration

mutating func appendLiteral(_ literal: Self.StringLiteralType)

Parameters

  • literal:

    A string literal containing the characters that appear next in the string literal.

Discussion

Don’t call this method directly. Instead, initialize a variable or constant using a string literal with interpolated expressions.

Interpolated expressions don’t pass through this method; instead, Swift selects an overload of appendInterpolation. For more information, see the top-level StringInterpolationProtocol documentation.