Method: Trim blanks
Function name: trim
Parameter list: (CHAR value, CHAR trim_location)
Return type: CHAR
What the method does: Strips leading blanks, trailing blanks, or both, according to your specification. Accepts a character input value and a location indicator. The location indicator may be the quoted string 'L' or 'LEADING' in uppercase or lowercase (but not mixed) to strip leading blanks, 'T' or 'TRAILING' for trailing, or 'B' or 'BOTH' for both.
For example:
trim(Col5, 'leading');
where Col5 is a character column name.
Note: The second parameter can be a variable, in which case, the trim type cannot be checked at model validation time. Unless the value is one of the valid type characters, run-time errors can occur.
The trim character can be specified as a variable (as long as its type is character), in which case only the first character in the string is used if it is longer than one character.
Refer to Numeric Conversion Routines for more information.