# Left (String)

| **Name**    | ***Left***                                                                                                                                               |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Syntax      | Left (String str, Integer noOfChars)                                                                                                                     |
| Purpose     | To get the leftmost characters from the specified string.                                                                                                |
| Description | Returns the leftmost noOfChars from the string. If the string is smaller than noOfChars, the entire string is returned.                                  |
| Return Type | String                                                                                                                                                   |
| Parameters  | <p>str \[System.String] – String from which specified part will be returned</p><p>noOfChars \[System.Int64] – Maximum number of characters to return</p> |

![](https://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/0%20\(71\).png)

**Example**

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

Where,

*str* = AUSTRALIA

*noOfChars* = 3

![](https://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/1%20\(72\).png)

Right-click on the function transformation object and select *Preview Output.* You can see that Astera Data Stack has returned the first three characters of the specified string.

![](https://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/2%20\(72\).png)
