Trim function

The Trim function trims all leading and trailing spaces and replaces continuous sets of white space characters by a single space.

The string value of the parameter is normalized, as described in the following steps:
  1. All tabs, carriage returns, and line feeds are replaced with spaces.  
  2. Contiguous sequences of spaces are reduced to a single space.
  3. Trailing and leading spaces are removed.

Parameter: string

The string to trim and normalize. This can come from a source node, the result of another function, or a value you specify

Returns: string

The trimmed and normalized parameter.

Examples:
Input String Equals... The Trim Function Returns...
'  The string to trim and  normalize.  ' 'The string to trim and normalize.'
'           first line

                         second line

third line            '

'first line second line third line'



Feedback | Notices


Timestamp icon Last updated: Thursday, December 17, 2015


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.doc/ref_Trim.html