---
title: "length_grapheme function in Strata | Oplema"
description: "Count the visible characters in text, so a multi-part emoji counts as one character. Write it as length_grapheme(string) in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/length-grapheme"
updated: "2026-11-04"
---

# length\_grapheme

Number of grapheme clusters in string.

## Try an expression

In [Formula](https://oplema.com/docs/strata/prep/formula), enter the expression and set Output type to **BIGINT**.

### Expression

```
length_grapheme('🤦🏼‍♂️🤦🏽‍♀️')
```

### Result

```
2
```

To use your own data, replace the example values with column names. Keep format strings and other options as written.

Try it live in Formula

Result
| id | result |
| --- | --- |
| 1 | 2 |

## Arguments and types

```
length_grapheme(string)
```

**string**

Text

Supported signatures (1)

```
length_grapheme(string: VARCHAR) → BIGINT
```

The result type can depend on the input types. See DuckDB for the full argument rules.

## Things to know

If the first argument is missing, the result is NULL.

## Related functions

[substring\_grapheme

Extracts substring starting from grapheme clusters start up to the end of the string. If optional argument length is set, extracts a substring of length grapheme clusters instead. Note that a start value of 1 refers to the first character of the string.

](https://oplema.com/docs/strata/functions/substring-grapheme)[bit\_length

Number of bits in a string.

](https://oplema.com/docs/strata/functions/bit-length)[damerau\_levenshtein

Count the edits needed to turn one string into another, like levenshtein, but swapping two neighboring characters counts as one edit. Uppercase and lowercase letters count as different.

](https://oplema.com/docs/strata/functions/damerau-levenshtein)[left\_grapheme

Extracts the left-most count grapheme clusters.

](https://oplema.com/docs/strata/functions/left-grapheme)

[Browse text](https://oplema.com/docs/strata/functions#text) [DuckDB documentation](https://duckdb.org/docs/current/sql/functions/text.html#length_graphemestring)

Function metadata from DuckDB, used under the [MIT license](https://github.com/duckdb/duckdb/blob/v1.5.4/LICENSE).
