utility_lowercase Function

public function utility_lowercase(string)

Uses

  • proc~~utility_lowercase~~UsesGraph proc~utility_lowercase utility_lowercase module~w90_io w90_io proc~utility_lowercase->module~w90_io module~w90_constants w90_constants module~w90_io->module~w90_constants

Takes a string and converts to lowercase characters

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: string

Return Value character(len=maxlen)


Called by

proc~~utility_lowercase~~CalledByGraph proc~utility_lowercase utility_lowercase proc~param_in_file param_in_file proc~param_in_file->proc~utility_lowercase proc~param_lib_set_atoms param_lib_set_atoms proc~param_lib_set_atoms->proc~utility_lowercase proc~wannier_run wannier_run proc~wannier_run->proc~param_lib_set_atoms proc~param_read param_read proc~wannier_run->proc~param_read proc~param_read->proc~param_in_file proc~wannier_setup wannier_setup proc~wannier_setup->proc~param_lib_set_atoms proc~wannier_setup->proc~param_read program~wannier wannier program~wannier->proc~param_read program~postw90 postw90 program~postw90->proc~param_read

Contents

Source Code


Source Code

  function utility_lowercase(string)!
    !=================================!
    !                                 !
    !! Takes a string and converts to
    !!  lowercase characters
    !                                 !
    !=================================!

    use w90_io, only: maxlen

    implicit none

    character(len=*), intent(in) :: string
    character(len=maxlen) :: utility_lowercase

    integer :: iA, iZ, idiff, ipos, ilett

    iA = ichar('A')
    iZ = ichar('Z')
    idiff = iZ - ichar('z')

    utility_lowercase = string

    do ipos = 1, len(string)
      ilett = ichar(string(ipos:ipos))
      if ((ilett .ge. iA) .and. (ilett .le. iZ)) &
        utility_lowercase(ipos:ipos) = char(ilett - idiff)
    enddo

    utility_lowercase = trim(adjustl(utility_lowercase))

    return

  end function utility_lowercase