z/OS TSO/E REXX Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


STRIP

z/OS TSO/E REXX Reference
SA32-0972-00

Read syntax diagramSkip visual syntax diagram
>>-STRIP(string--+------------------------+--)-----------------><
                 '-,-+--------+-+-------+-'      
                     '-option-' '-,char-'        

returns string with leading or trailing characters or both removed, based on the option you specify. The following are valid options. (Only the capitalized and highlighted letter is needed; all characters following it are ignored.)
Both
removes both leading and trailing characters from string. This is the default.
Leading
removes leading characters from string.
Trailing
removes trailing characters from string.

The third argument, char, specifies the character to be removed, and the default is a blank. If you specify char, it must be exactly one character long.

Here are some examples:
STRIP('  ab c  ')        ->    'ab c'
STRIP('  ab c  ','L')    ->    'ab c  '
STRIP('  ab c  ','t')    ->    '  ab c'
STRIP('12.7000',,0)      ->    '12.7'
STRIP('0012.700',,0)     ->    '12.7'

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014