TRIM(STRING)

Purpose

Returns the argument with trailing blank characters removed.

Class

Transformational function

Argument type and attributes

STRING
An INTENT(IN) CHARACTER scalar

Result type and attributes

Character with the same kind type parameter value as STRING and with a length that is the length of STRING less the number of trailing blanks in STRING.

Result value

Examples

TRIM ('␢A␢B␢␢') has the value '␢A␢B'.