# 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://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/0%20\(69\).png)

**Example**

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

Where,

*str* = ABCDEFG

![](https://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/1%20\(70\).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://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/2%20\(70\).png)
