Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(inout) | :: | string |
subroutine ESMF_Config_Trim ( string ) !------------------------------------------------------------------------- ! ! !ROUTINE: ESMF_Config_Trim() - Removes leading white space from strings. ! ! !DESCRIPTION: ! ! Removes blanks and TABS from beginning of string. ! This is a low level i90 routine. ! ! !CALLING SEQUENCE: ! ! call ESMF_Config_Trim ( string ) ! ! !INPUT PARAMETERS: ! character(*), intent(inout) :: string ! the input string ! ! !OUTPUT PARAMETERS: ! ! character(*), intent(inout) :: string ! the modified string ! ! !------------------------------------------------------------------------- integer :: ib, i ! Find first non-blank/non-tab character ! -------------------------------------- ib = 1 do i = 1, len (string)-1 if ( string(i:i) .ne. ' ' .and. & string(i:i) .ne. TAB ) exit ib = ib + 1 end do ! String without leading blanks/tabs ! ---------------------------------- string = string(ib:) end subroutine ESMF_Config_trim