Routine that converts spaces in a string to underscores author: P J Knight, CCFE, Culham Science Centre string : input/output string : character string of interest This routine converts any space characters in the string to underscore characters. None
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(inout) | :: | string |
subroutine underscore(string)
!! Routine that converts spaces in a string to underscores
!! author: P J Knight, CCFE, Culham Science Centre
!! string : input/output string : character string of interest
!! This routine converts any space characters in the string
!! to underscore characters.
!! None
!
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
use numerics, only: active_constraints, boundu, boundl
use constants, only: electron_charge
implicit none
! Arguments
character(len=*), intent(inout) :: string
! Local variables
integer :: loop, i
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
i = index(string, ' ')
if (i > 0) then
do loop = i, len(string)
if (string(loop:loop) == ' ') string(loop:loop) = '_'
end do
end if
end subroutine underscore