W3cubDocs

/GNU Fortran 5

9.8 ADJUSTL — Left adjust a string

Description:
ADJUSTL(STRING) will left adjust a string by removing leading spaces. Spaces are inserted at the end of the string as needed.
Standard:
Fortran 90 and later
Class:
Elemental function
Syntax:
RESULT = ADJUSTL(STRING)
Arguments:
STRING The type shall be CHARACTER.
Return value:
The return value is of type CHARACTER and of the same kind as STRING where leading spaces are removed and the same number of spaces are inserted on the end of STRING.
Example:
program test_adjustl
  character(len=20) :: str = '   gfortran'
  str = adjustl(str)
  print *, str
end program test_adjustl
See also:
ADJUSTR, TRIM

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-5.4.0/gfortran/ADJUSTL.html