9.3.161 TRIM (STRING)

Description:  Returns the argument with trailing blanks removed.  
Class:  Transformational function; Generic 
Arguments:  STRING must be a scalar of type character. 
Results:  The result type is character with the same kind parameter as STRING. Its length is the length of STRING minus the number of trailing blanks in STRING.

The value of the result is the same as STRING, except any trailing blanks are removed. If STRING contains only blank characters, the result has zero length. 

Examples

In these examples, the symbol - represents a blank.

TRIM ('--NAME----') has the value '--NAME'.

TRIM ('--C--D-----') has the value '--C--D'.


Previous Page Next Page Table of Contents