---
title: "init(stringLiteral:)"
framework: swift
role: symbol
role_heading: Initializer
path: "swift/staticstring/init(stringliteral:)"
---

# init(stringLiteral:)

Creates an instance initialized to the value of a string literal.

## Declaration

```swift
init(stringLiteral value: StaticString)
```

## Discussion

Discussion Do not call this initializer directly. It may be used by the compiler when you initialize a static string using a string literal.
