<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/ExpressibleByExtendedGraphemeClusterLiteral",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s43ExpressibleByExtendedGraphemeClusterLiteralP"
  },
  "title" : "ExpressibleByExtendedGraphemeClusterLiteral"
}
-->

# ExpressibleByExtendedGraphemeClusterLiteral

A type that can be initialized with a string literal containing a single
extended grapheme cluster.

```
protocol ExpressibleByExtendedGraphemeClusterLiteral : ExpressibleByUnicodeScalarLiteral
```

## Overview

An *extended grapheme cluster* is a group of one or more Unicode scalar
values that approximates a single user-perceived character.  Many
individual characters, such as “é”, “김”, and “🇮🇳”, can be made up of
multiple Unicode scalar values. These code points are combined by
Unicode’s boundary algorithms into extended grapheme clusters.

The `String`, `StaticString`, and `Character` types conform to the
`ExpressibleByExtendedGraphemeClusterLiteral` protocol. You can initialize
a variable or constant of any of these types using a string literal that
holds a single character.

```
let snowflake: Character = "❄︎"
print(snowflake)
// Prints "❄︎"
```

# Conforming to ExpressibleByExtendedGraphemeClusterLiteral

To add `ExpressibleByExtendedGraphemeClusterLiteral` conformance to your
custom type, implement the required initializer.

## Relationships

### Conforming Types

[`Substring`](/documentation/Swift/Substring)

[`StaticString`](/documentation/Swift/StaticString)

[`LocalizationValue`](/documentation/Swift/String/LocalizationValue)

[`String`](/documentation/Swift/String)

[`Character`](/documentation/Swift/Character)

### Inherited By

[`StringProtocol`](/documentation/Swift/StringProtocol)

[`ExpressibleByStringLiteral`](/documentation/Swift/ExpressibleByStringLiteral)

[`ExpressibleByStringInterpolation`](/documentation/Swift/ExpressibleByStringInterpolation)

### Inherits From

[`ExpressibleByUnicodeScalarLiteral`](/documentation/Swift/ExpressibleByUnicodeScalarLiteral)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)