trim_null Subroutine

private subroutine trim_null(string)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(inout) :: string

Source Code

subroutine trim_null(string)

  character(len=*), intent(inout) :: string
  
  integer :: i

  do i=1,len(string)
   if (iachar(string(i:i))==0) then
      string(i:i)=' '
   endif
  enddo
  return
end subroutine trim_null