RJUST
Right-justifies a string.
Type
String function
Format
RJUST('string' [length]) - string
- The input string.
- length
- The length of the output string. The length of string is used if this parameter is omitted or zero.
Usage Notes®
- Trailing blanks are removed, and the remaining string is right-justified within length with leading blanks inserted as needed.
- The input string is not changed.
- If length is shorter than the length of string, the string is truncated on the left.
Example
The following example sets S to '
abc ABC abc':
set S (rjust(' abc ABC abc '))The
following example sets S to ' abc ABC abc':
set S (rjust('abc ABC abc' 16))The
following example sets S to 'c ABC abc':
set S (rjust('abc ABC abc' 9))