9.10. ADJUSTR

9.10 ADJUSTR — Right adjust a string

Description:

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

Standard:

Fortran 95 and later

Class:

Elemental function

Syntax:

RESULT = ADJUSTR(STRING)

Arguments:
STR 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:
program test_adjustr
  character(len=20) :: str = 'gfortran'
  str = adjustr(str)
  print *, str
end program test_adjustr
See also:

ADJUSTL, TRIM

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gfortran/ADJUSTR.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部