remove_blanks Function

public pure function remove_blanks(str_in) result(str_out)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: str_in

Return Value character(len=LEN)


Called by

proc~~remove_blanks~~CalledByGraph proc~remove_blanks remove_blanks proc~cntstr CNTSTR proc~cntstr->proc~remove_blanks proc~converttoproposalstr ConvertToProposalStr proc~converttoproposalstr->proc~remove_blanks proc~fillstrings FillStrings proc~fillstrings->proc~remove_blanks proc~findstr FindStr proc~findstr->proc~remove_blanks proc~get_imode get_iMode proc~get_imode->proc~remove_blanks proc~getint GETINT proc~getint->proc~converttoproposalstr proc~getintallocarray GETINTALLOCARRAY proc~getintallocarray->proc~converttoproposalstr proc~getintarray GETINTARRAY proc~getintarray->proc~converttoproposalstr proc~getlogical GETLOGICAL proc~getlogical->proc~converttoproposalstr proc~getreal GETREAL proc~getreal->proc~converttoproposalstr proc~getrealallocarray GETREALALLOCARRAY proc~getrealallocarray->proc~converttoproposalstr proc~getrealarray GETREALARRAY proc~getrealarray->proc~converttoproposalstr proc~initmhd3d t_functional_mhd3d%InitMHD3D proc~initmhd3d->proc~get_imode proc~initmhd3d->proc~getrealallocarray proc~initprofile InitProfile proc~initmhd3d->proc~initprofile proc~initanalyze InitAnalyze proc~initanalyze->proc~getrealallocarray proc~initprofile->proc~getrealallocarray

Source Code

PURE FUNCTION remove_blanks(str_in) RESULT(str_out)
  IMPLICIT NONE
  !-------------------------------------------
  !input
  CHARACTER(LEN=*),INTENT(IN) :: str_in
  !output
  CHARACTER(LEN=LEN(str_in))  :: str_out
  !-------------------------------------------
  ! LOCAL VARIABLES
  INTEGER :: len_in,i,j
  !==============================================================================
  len_in=LEN_TRIM(str_in)
  str_out=""
  j=1
  DO i=1,len_in
    IF (str_in(i:i).NE.' ') THEN
      str_out(j:j)=str_in(i:i)
      j=j+1
    END If
  END DO
END FUNCTION remove_blanks