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

# init(stringLiteral:)

Creates an instance initialized to the given string value.

## Declaration

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

## Discussion

Discussion Do not call this initializer directly. It is used by the compiler when you initialize a string using a string literal. For example: let nextStop = "Clark & Lake" This assignment to the nextStop constant calls this string literal initializer behind the scenes.

## See Also

### Infrequently Used Functionality

- [index(of:)](swift/string/index(of:).md)
- [init(_:)](swift/string/init(_:)-5a5lw.md)
- [init(stringInterpolation:)](swift/string/init(stringinterpolation:).md)
- [init(unicodeScalarLiteral:)](swift/string/init(unicodescalarliteral:).md)
- [init(extendedGraphemeClusterLiteral:)](swift/string/init(extendedgraphemeclusterliteral:).md)
- [customPlaygroundQuickLook](swift/string/customplaygroundquicklook.md)
- [withContiguousStorageIfAvailable(_:)](swift/string/withcontiguousstorageifavailable(_:).md)
