# 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2Fccj4jfdvtZRmfvDeD3pp%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 =* ABCDEFGH

*noOfChars* = 3

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FTv9JxyRN6BAyO5c1yZg8%2F1.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 of the specified *noOfChars*, from the right.

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