trim(3f) - [FORTRAN:INTRINSIC:CHARACTER] Remove trailing blank characters of a string
Syntax
Description
Arguments
Return Value
Example
Standard
Class
See Also
result = trim(string)
Removes trailing blank characters of a string.
STRING - Shall be a scalar of type CHARACTER.
A scalar of type CHARACTER which length is that of STRING less the number of trailing blanks.
Sample program:
program demo_trim character(len=10), parameter :: s = "gfortran " write(*,*) len(s), len(trim(s)) ! "10 8", with/without trailing blanks end program demo_trim
[[Fortran 95]] and later
Transformational function
Functions that perform operations on character strings, return lengths of arguments, and search for certain arguments:
Elemental: ADJUSTL, ADJUSTR, INDEX, LEN_TRIM, SCAN, VERIFY; Nonelemental: REPEAT, TRIM
trim (3) | March 19, 2019 |