ADJUSTL (The GNU Fortran Compiler)

### 8.10 `ADJUSTL` — Left adjust a string ¶

Synopsis:

  `RESULT = ADJUSTL(STRING)`

Description:

  `ADJUSTL(STRING)` left adjusts a string by removing leading spaces. Spaces are inserted at the end of the string as needed.

Class:

  Elemental function

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

Standard:

  Fortran 90 and later

See also:

  `ADJUSTR` — Right adjust a string,
  `TRIM` — Remove trailing blank characters of a string