---
title: ExpressibleByUnicodeScalarLiteral
framework: swift
role: symbol
role_heading: Protocol
path: swift/expressiblebyunicodescalarliteral
---

# ExpressibleByUnicodeScalarLiteral

A type that can be initialized with a string literal containing a single Unicode scalar value.

## Declaration

```swift
protocol ExpressibleByUnicodeScalarLiteral
```

## Overview

Overview The String, StaticString, Character, and Unicode.Scalar types all conform to the ExpressibleByUnicodeScalarLiteral protocol. You can initialize a variable of any of these types using a string literal that holds a single Unicode scalar. let ñ: Unicode.Scalar = "ñ" print(ñ) // Prints "ñ" Conforming to ExpressibleByUnicodeScalarLiteral To add ExpressibleByUnicodeScalarLiteral conformance to your custom type, implement the required initializer.

## Topics

### Associated Types

- [UnicodeScalarLiteralType](swift/expressiblebyunicodescalarliteral/unicodescalarliteraltype.md)

### Initializers

- [init(unicodeScalarLiteral:)](swift/expressiblebyunicodescalarliteral/init(unicodescalarliteral:).md)

## Relationships

### Inherited By

- [ExpressibleByExtendedGraphemeClusterLiteral](swift/expressiblebyextendedgraphemeclusterliteral.md)
- [ExpressibleByStringInterpolation](swift/expressiblebystringinterpolation.md)
- [ExpressibleByStringLiteral](swift/expressiblebystringliteral.md)
- [StringProtocol](swift/stringprotocol.md)

### Conforming Types

- [Character](swift/character.md)
- [StaticString](swift/staticstring.md)
- [String](swift/string.md)
- [String.LocalizationValue](swift/string/localizationvalue.md)
- [Substring](swift/substring.md)
- [Unicode.Scalar](swift/unicode/scalar.md)

## See Also

### String Literals

- [ExpressibleByStringLiteral](swift/expressiblebystringliteral.md)
- [ExpressibleByExtendedGraphemeClusterLiteral](swift/expressiblebyextendedgraphemeclusterliteral.md)
- [ExpressibleByStringInterpolation](swift/expressiblebystringinterpolation.md)
- [StringInterpolationProtocol](swift/stringinterpolationprotocol.md)
- [DefaultStringInterpolation](swift/defaultstringinterpolation.md)
