3.2.50. STRIP(string[,[option][,char]])

Returns string after possibly stripping it of any number of
leading and/or trailing characters. The default action is to strip
off both leading and trailing blanks. If char (which must be a
string containing exactly one character) is specified, that
character will be stripped off instead of blanks. Inter-word
blanks (or chars if defined, that are not leading of trailing) are
untouched.

If option is specified, it will define what to strip. The possible
values for option are:

[L]
     (Leading) Only strip off leading blanks, or chars if
     specified.

[T]
     (Trailing) Only strip off trailing blanks, or chars if
     specified.

[B]
     (Both) Combine the effect of L and T, that is, strip off both
     leading and trailing blanks, or chars if it is specified.
     This is the default action.


     STRIP(‘ Foo  bar ‘)      –>   ‘Foo  bar’
     STRIP(‘ Foo  bar ‘, ‘L’) –>   ‘Foo  bar ‘
     STRIP(‘ Foo  bar ‘, ‘t’) –>   ‘ Foo  bar’
     STRIP(‘ Foo  bar ‘, ‘Both’)   –>   ‘Foo  bar’
     STRIP(‘0.1234500’,, ‘0’) –>   ‘.12345’
     STRIP(‘0.1234500 ‘,, ‘0’)     –>   ‘.1234500’



PREV NEXT