adjustl(3f) - [FORTRAN:INTRINSIC:CHARACTER] Left adjust a string
result = ADJUSTL(STRING)
adjustl(STRING) will left adjust a string by removing leading spaces. Spaces are inserted at the end of the string as needed.
STRING the type shall be CHARACTER.
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.
Sample program:
program demo_adjustl implicit none character(len=20) :: str = gfortran str = adjustl(str) print *, str end program demo_adjustl
[[Fortran 95]] and later
Elemental function
Functions that perform operations on character strings, return lengths of arguments, and search for certain arguments:
elemental: adjustl(3), adjustr(3), index(3), len_trim(3), scan(3), verify(3) nonelemental: repeat(3), trim(3)
adjustl (3) | March 11, 2021 |