# 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FHxoRzI5VIttxjenqOi3s%2F0.png?alt=media)

**Example**

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

Where,

*str* = ABCDEFG

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FVvoDqLtDm54dsucrbwq4%2F1.png?alt=media)

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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2Fk5zmlSDKb0Z4DMCCeNrq%2F2.png?alt=media)
