> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# char_length

> Returns the number of characters in a string.

This function returns the length of a string. For multi-byte characters, it returns the number of characters. It currently only supports utf8 coding. Note: This function is also named as character\_length.

## Syntax

```Haskell theme={null}
INT char_length(VARCHAR str)
```

## Examples

```Plain Text theme={null}
MySQL > select char_length("abc");
+--------------------+
| char_length('abc') |
+--------------------+
|                  3 |
+--------------------+
```

## keyword

CHAR\_LENGTH, CHARACTER\_LENGTH


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.