# LENGTH function

## `LENGTH` function

| Function Name | Description | Usage | Input parameter | Return value |
|---|---|---|---|---|
| `LENGTH` | Calculates the length of a string. The length of a string is the number of characters in the string. | `LENGTH()` | N/A | Length of the string. |

## Supported data type


The `LENGTH` function supports the following data type:

- String

## Example: Calculate the length of a string


**Sample data** : `$var1$ = "Hello Apigee Test"`


**Usage** : `$var1$.LENGTH()`
Calculate the length of string var1.


**Output** : `17`

## Recommendation

- Learn how to add and configure a [Data Mapping task](https://docs-0cloud-0google-0com.linkedin.net.nz/application-integration/docs/configure-data-mapping-task.md.txt)