Purpose
Returns the length of the character
argument without counting trailing blank characters.
Argument type and attributes
- STRING
- An INTENT(IN) CHARACTER
- KIND (optional)
- An INTENT(IN) INTEGER scalar.
The actual argument corresponding to KIND must
be a constant expression.
Result type and attributes
- It is of type integer.
- If KIND is present,
the KIND type parameter is that specified
by the value of KIND; otherwise, the KIND type
parameter is that of default integer type.
Result value
The result has a value equal
to the number of characters remaining after any trailing blanks in
STRING are removed. If the argument contains no nonblank characters,
the result is zero.
Examples
LEN_TRIM ('␢A␢B␢')
has the value 4. LEN_TRIM ('␢␢') has the
value 0.