right
Modified on Wed, 16 Aug 2023
Description
Return a specified number of characters from the end of a string
Syntax
right(text, length)
Parameters
Input Parameter | Type | Description |
---|---|---|
text | string | The input string |
length | number | The number of characters to return from the end |
Return value
Type |
---|
string |
Sample
Example | Result | Description |
---|---|---|
right("abcd", 2) | "cd" | The substring containing the rightmost characters |
right("abcd", 5) | "abcd" | right function with length greater than the string length |
right("", 5) | "" | right function for an empty string |
To view all the String functions, click here.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article