# TrimEnd

| **Name**    | ***TrimEnd***                                                                                                                  |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Syntax      | TrimEnd (String str)                                                                                                           |
| Purpose     | To return a string after removing any trailing white space characters from the specified string.                               |
| Description | Removes any trailing white spaces from the string argument. Whitespaces include space, new line, tab, and linefeed characters. |
| Return Type | String                                                                                                                         |
| Parameters  | str \[System.String] – String which will be trimmed                                                                            |

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

**Example**

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

Where,

*str*: ABC

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

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

Right-click on the function transformation object and select *Preview Output.* You can see that Astera Data Stack has returned a string value, with trimmed trailing whitespace characters.

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