# Trim

| **Name**    | ***Trim***                                                                                                                                    |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Syntax      | Trim (String str)                                                                                                                             |
| Purpose     | To remove the leading and trailing white space characters from the specified string.                                                          |
| Description | Removes any leading and trailing white spaces from the string argument. Whitespaces include spaces, new lines, tabs, 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%2F2Y9KstExqRzgqgcrpCIz%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%2Fr7VROG48IZAPawvNcX7y%2F1.png?alt=media)

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FMTzHIGWeur1eM57y2TBq%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 leading and trailing whitespace characters.

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