[UP]


Manual Reference Pages  - trim (3)

NAME

trim(3f) - [FORTRAN:INTRINSIC:CHARACTER] Remove trailing blank characters of a string

CONTENTS

Syntax
Description
Arguments
Return Value
Example
Standard
Class
See Also

SYNTAX

result = trim(string)

DESCRIPTION

Removes trailing blank characters of a string.

ARGUMENTS

STRING - Shall be a scalar of type CHARACTER.

RETURN VALUE

A scalar of type CHARACTER which length is that of STRING less the number of trailing blanks.

EXAMPLE

Sample program:

    program demo_trim
      character(len=10), parameter :: s = "gfortran  "
      write(*,*) len(s), len(trim(s))  ! "10 8", with/without trailing blanks
    end program demo_trim

STANDARD

[[Fortran 95]] and later

CLASS

Transformational 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


trim (3) March 19, 2019
Generated by manServer 1.08 from d029773c-e4fb-43c1-b8dc-037b7d09a541 using man macros.