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