REXX – Formatting Functions

The following built-in Rexx Formatting Functions manipulate the characters and spacing in strings supplied in the argument.

 

Function Description
CENTER or CENTRE. Returns a string of a specified length with the input string centered in it, with pad characters added as necessary to make up the length.
COPIES Returns the specified number of concatenated copies of the input string.
FORMAT Returns the input number, rounded and formatted.
JUSTIFY This function is only provided by TSO. It returns a specified string formatted by adding pad characters between words to justify to both margins.
LEFT Returns a string of the specified length, truncated or padded on the right as needed.
RIGHT Returns a string of the specified length, truncated or padded on the left as needed.
SPACE Returns the words in the input string with a specified number of pad characters between each word.

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.