adjustl(string)
will left adjust a string by removing leading spaces. Spaces are inserted at the end of the string as needed.
Fortran 95 and later
Elemental function
result = adjustl(string)
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
.
program test_adjustl
character(len=20) :: str = ' gfortran'
str = adjustl(str)
print *, str
end program test_adjustl