TRIM(3f)

DESCRIPTION
Removes trailing blank characters of a string.

STANDARD
Fortran 95 and later

CLASS
Transformational function

SYNTAX
RESULT = TRIM(STRING)

ARGUMENTS

STRING Shall be a scalar of type CHARACTER.

RETURN VALUE
A scalar of type CHARACTER which length is that of STRING less the number of trailing blanks.

EXAMPLE
          PROGRAM test_trim
            CHARACTER(len=10), PARAMETER :: s = "GFORTRAN "
            WRITE(*,*) LEN(s), LEN(TRIM(s)) ! "10 8", with/without trailing blanks
          END PROGRAM

SEE ALSO
ADJUSTL, ADJUSTR

AUTHOR

This information was taken from the GFortran documentation (https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gfortran/) and converted to a manpage by AstroFloyd (http://astrofloyd.org).