Overview
The right()
function returns a substring of a given string, containing a specified number of rightmost characters.
Syntax
right(str, length)
Argument | Type | Description |
---|---|---|
str |
String | The string to extract substring from |
length |
Integer > 0 | The number of characters in the substring |
Return type: String
Example of Result
return right("a database", 4)
Result: base
Example of Use
Extract the last 4 characters of the certificate numbers.
find().nodes({@certificate}) as cert
return right(cert.no, 4)