upper_to_lower Function

public function upper_to_lower(string) result(result_string)

Function to turn all upper case characters to lower case.

The resulting string returned has the same length as the input string, and all upper case characters turned into lower case.

Arguments

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

string to be converted

Return Value character(len=len)

converted string


Called by

proc~~upper_to_lower~~CalledByGraph proc~upper_to_lower upper_to_lower proc~load_spatial_predefined load_spatial_predefined proc~load_spatial_predefined->proc~upper_to_lower proc~hvs_output_load hvs_output_load proc~hvs_output_load->proc~upper_to_lower proc~tem_variable_load_single tem_variable_load_single proc~tem_variable_load_single->proc~upper_to_lower proc~load_spacetime_predefined load_spacetime_predefined proc~load_spacetime_predefined->proc~upper_to_lower proc~hvs_vtk_config_load~2 hvs_vtk_config_load proc~hvs_vtk_config_load~2->proc~upper_to_lower proc~tem_open tem_open proc~tem_open->proc~upper_to_lower proc~tem_load_reduction_single tem_load_reduction_single proc~tem_load_reduction_single->proc~upper_to_lower proc~tem_load_onecanonicalnd tem_load_oneCanonicalND proc~tem_load_onecanonicalnd->proc~upper_to_lower proc~tem_load_convergenceheader tem_load_convergenceHeader proc~tem_load_convergenceheader->proc~upper_to_lower proc~tem_timer_loadconfig tem_timer_loadconfig proc~tem_timer_loadconfig->proc~upper_to_lower proc~tem_timer_dumplabeled tem_timer_dumplabeled proc~tem_timer_dumplabeled->proc~upper_to_lower

Contents

Source Code


Source Code

  function upper_to_lower(string) result(result_string)
    ! ---------------------------------------------------------------------------
    !> string to be converted
    character(len=*)    :: string
    !> converted string
    character(len=len(string))    :: result_string
    ! ---------------------------------------------------------------------------
    integer :: mm
    ! ---------------------------------------------------------------------------

    result_string=''
    do mm=1,len_trim(string)
      if( ('A' <= string(mm:mm)) .and. (string(mm:mm) <= 'Z') ) then
        result_string(mm:mm) = char(iachar(string(mm:mm))+32)
      else
        result_string(mm:mm)=string(mm:mm)
      end if
    end do
  end function upper_to_lower