Monday, February 25, 2008

What characters to Trim:

%TRIM, %TRIMR & %TRIML is enhanced in V5R3 to allow an optional second parameter giving the list of characters to be trimmed.
Example:
Eval trimchars = '*-.'
Eval data = '***a-b-c-.'
result = %trim(data : trimchars)

// now result = 'a-b-c'. All * - and . were trimmed from the ends of the data

No comments: