---
title: "appendLiteral(_:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/stringinterpolationprotocol/appendliteral(_:)"
---

# appendLiteral(_:)

Appends a literal segment to the interpolation.

## Declaration

```swift
mutating func appendLiteral(_ literal: Self.StringLiteralType)
```

## Parameters

- `literal`: A string literal containing the characters that appear next in the string literal.

## Discussion

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.
