Clicky
Showing changes from revision #1 to #2:
(追記) Added (追記ここまで) | (削除) Removed (削除ここまで) | (削除) Chan (削除ここまで)(追記) ged (追記ここまで)
Removes trailing blank characters of a string.
Fortran 95 and later
Transformational function
result = trim(string)
string
- Shall be a scalar of type character
.A scalar of type character
which length is that of string
less the number of trailing blanks.
program test_trim
character(len=10), parameter :: s = "gfortran "
write(*,*) len(s), len(trim(s)) ! "10 8", with/without trailing blanks
end program