This is the documentation for the development version. There are no official binaries for it; build it from the source code in git. Download links on these pages work only after the release. For the current release, see version 7.0.

right()

Deprecated in 5.0.

Replaced with method right() of the string instance.

right(string, length, pad): String

Returns the string of length characters of string, optionally padded with pad character instead of blank (space) starting from the right. Padding occurs on the left portion of the string.

Table 1. Parameters

string

String

The string which will be processed.

length

Integer

The number of character to return, must be a positive integer.

pad

String

The pad character to use instead of blank spaces. Option parameter.

Return

String of the right length characters.

println(right("abc  d",8)); //Will print "  abc  d"
println(right("abc def",5)); //Will print "c def"
println(right("17",5,"0")); //Will print "00017"