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®

  1. Trailing blanks are removed, and the remaining string is right-justified within length with leading blanks inserted as needed.
  2. The input string is not changed.
  3. 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))

See Also

CENTER

LJUST