Right
Returns a substring that ends at the end of the string.
Syntax
Right(string, nchar)
Parameters
Parameter |
Type |
Description |
---|---|---|
string |
string |
String parameter. |
nchar |
number |
Number of characters in the substring |
Return
Extracts right nchar characters from string, returns string.
Note
In Python, use string slicing: https://pythoncentral.io/cutting-and-slicing-strings-in-python/
Examples
Python
s = 'abcdefg'
sub = s[-3:]
# sub now is "efg"
NexScript
sub = Right("abcdefg", 3)
% sub now is "efg"