Command STRPAD
Function:
Pad a text string with space characters. The padded text string is stored in an environment variable called STRPAD.
Syntax:
STRPAD LEFT | RIGHT | CENTRE width [text]
| LEFT | RIGHT | CENTRE | Specifies how to justify the text string :-
| LEFT | - insert spaces at the end of the string. |
| RIGHT | - insert spaces at the front of the string. |
| CENTRE | - insert spaces at both the front and the end of the string so that the string is centred. |
|
| width | Specifies the minimum width of the text string. When the length of the string is less then the width then space characters are inserted to pad the text string. |
| text | Sequence of characters. |
Note:
- When the text is larger then the specified width then the text is copied to the environment variable unmodified.
- Also see command STRTRIM and Batch Programs.
|