$right
Welcome to our Knowledge Base
Documentation | Blog | Demos | Support
< All Topics
Print
$right
0 out of 5 stars
5 Stars | 0% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
Extracts a segment from the end of a character string.
Syntax
$right(source,length)
Parameters
source | a character string, or an expression that evaluates to a character string |
length | a number, or an expression that evaluates to a number |
Return Value
Character string, consisting of length characters from source, starting length character positions from the end of source.
Comments
Use $right to produce a string consisting of length characters from source, starting length character positions from the end of source.
If source is not of a character data type, it is converted to a character data type before the function is applied.
If length is zero or negative, the result is the null string.
If length is longer than source, the result is source.
Example
$right("abcdefgh",5)
Evaluates to “defgh”.
$right(1234,2)
Evaluates to “34”.
$right(1234567890,8)
Evaluates to “34567890”.
See Also
Updated
ByJason Lee
Was this article helpful?
0 out of 5 stars
5 Stars | 0% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
5