[UP]


Manual Reference Pages  - adjustr (3)

NAME

ADJUSTR(3f) - [FORTRAN:INTRINSIC:CHARACTER] Right adjust a string

CONTENTS

Syntax
Description
Arguments
Return Value
Example
Standard
Class
See Also

SYNTAX

result = ADJUSTR(STRING)

DESCRIPTION

ADJUSTR(STRING) will right adjust a string by removing trailing spaces. Spaces are inserted at the start of the string as needed.

ARGUMENTS

STRING - the type shall be CHARACTER.

RETURN VALUE

The return value is of type CHARACTER and of the same kind as STRING where trailing spaces are removed and the same number of spaces are inserted at the start of STRING.

EXAMPLE

Sample program:

    program demo_adjustr
      character(len=20) :: str = ’gfortran’
      str = adjustr(str)
      print *, str
    end program demo_adjustr

STANDARD

[[Fortran 95]] and later

CLASS

Elemental function

SEE ALSO

Functions that perform operations on character strings, return lengths of arguments, and search for certain arguments:
Elemental:
  ADJUSTL, ADJUSTR, INDEX, LEN_TRIM, SCAN, VERIFY;
Nonelemental:
  REPEAT, TRIM


adjustr (3) March 18, 2019
Generated by manServer 1.08 from e2cfbba6-3db7-442b-9a96-f706e3b6c5b6 using man macros.