# Length (String)

| **Name**    | ***Length***                                                   |
| ----------- | -------------------------------------------------------------- |
| Syntax      | Length (String str)                                            |
| Purpose     | To return the number of characters in the specified string.    |
| Description | Gets the number of characters in the specified string.         |
| Return Type | Int64                                                          |
| Parameters  | str \[System.String] – value for which length will be returned |

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/mVA4CeiDHNookR4GXsy3/0.png)

**Example**

In this example, we are passing the required parameter to the function transformation object using a *Variables* object.

Where,

*str* = ABCDEFG

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/yguY0uaXjEMiGj6JGs2w/1.png)

Right-click on the function transformation object and select *Preview Output.* You can see that Astera Data Stack has returned the value, “7”, indicating that the specified string consists of seven characters.

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/Wk7JEK62FGEenbPm8nvX/2.png)
