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

# appendLiteral(_:)

Appends a literal segment of a string interpolation.

## Declaration

```swift
mutating func appendLiteral(_ literal: String)
```

## Discussion

Discussion You don’t need to call this method directly. It’s used by the compiler when interpreting string interpolations.
