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