# Right (String)

| **Name**    | ***Right***                                                                                                                               |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| Syntax      | String                                                                                                                                    |
| Purpose     | To get the rightmost noOfChars from the specified string.                                                                                 |
| Description | Returns rightmost noOfChars of string. If string is smaller than noOfChars, the entire string is returned.                                |
| Return Type | String                                                                                                                                    |
| Parameters  | <p>Str \[System.String] – String whose 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\(80\).png)

**Example**

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

Where,

*str =* ABCDEFGH

*noOfChars* = 3

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

Right-click on the function transformation object and select *Preview Output.* You can see that Astera Data Stack has returned a string of the specified *noOfChars*, from the right.

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