upper Function

private elemental function upper(self)

Type Bound

string

Arguments

Type IntentOptional Attributes Name
class(string), intent(in) :: self

Return Value type(string)


Called by

proc~~upper~2~~CalledByGraph proc~upper~2 string%upper proc~decode string%decode proc~decode->proc~upper~2 proc~encode string%encode proc~encode->proc~upper~2 proc~initialize xml_writer_appended%initialize proc~initialize->proc~upper~2 proc~initialize~5 vtk_file%initialize proc~initialize~5->proc~upper~2 proc~read_file string%read_file proc~read_file->proc~upper~2 proc~read_lines string%read_lines proc~read_file->proc~read_lines proc~read_file~3 read_file proc~read_file~3->proc~upper~2 proc~read_lines~3 read_lines proc~read_file~3->proc~read_lines~3 proc~read_file~4 read_file proc~read_file~4->proc~upper~2 proc~read_lines~4 read_lines proc~read_file~4->proc~read_lines~4 proc~read_line string%read_line proc~read_line->proc~upper~2 proc~read_lines~3->proc~upper~2 proc~read_lines~3->proc~read_line proc~read_lines~4->proc~upper~2 proc~read_lines~4->proc~read_line proc~write_block_scratch vtm_file%write_block_scratch proc~write_block_scratch->proc~upper~2 proc~write_block_string vtm_file%write_block_string proc~write_block_string->proc~upper~2 proc~write_dataarray_location_tag xml_writer_abstract%write_dataarray_location_tag proc~write_dataarray_location_tag->proc~upper~2 proc~write_fielddata_tag xml_writer_abstract%write_fielddata_tag proc~write_fielddata_tag->proc~upper~2 proc~write_file string%write_file proc~write_file->proc~upper~2 proc~write_lines string%write_lines proc~write_file->proc~write_lines proc~write_file~3 write_file proc~write_file~3->proc~upper~2 proc~write_lines~3 write_lines proc~write_file~3->proc~write_lines~3 proc~write_file~4 write_file proc~write_file~4->proc~upper~2 proc~write_lines~4 write_lines proc~write_file~4->proc~write_lines~4 proc~write_line string%write_line proc~write_line->proc~upper~2 proc~write_tag xml_tag%write_tag proc~write_tag->proc~upper~2 program~volatile_doctest~245 volatile_doctest program~volatile_doctest~245->proc~upper~2 program~volatile_doctest~364 volatile_doctest program~volatile_doctest~364->proc~upper~2 none~write_block vtm_file%write_block none~write_block->proc~write_block_scratch none~write_block->proc~write_block_string none~write_dataarray xml_writer_abstract%write_dataarray none~write_dataarray->proc~write_dataarray_location_tag none~write_fielddata xml_writer_abstract%write_fielddata none~write_fielddata->proc~write_fielddata_tag proc~write_fielddata1_rank0 xml_writer_abstract%write_fielddata1_rank0 none~write_fielddata->proc~write_fielddata1_rank0 proc~glob_string string%glob_string proc~glob_string->proc~read_file proc~read_lines->proc~read_line proc~write_check write_check proc~write_check->proc~initialize~5 proc~write_check->none~write_dataarray proc~write_check->none~write_fielddata none~write_geo xml_writer_abstract%write_geo proc~write_check->none~write_geo proc~write_lines->proc~write_line proc~write_lines~3->proc~write_line proc~write_lines~4->proc~write_line proc~write_slave write_slave proc~write_slave->proc~initialize~5 proc~write_slave->none~write_dataarray proc~write_slave->none~write_fielddata proc~write_slave->none~write_geo proc~write_vts write_vts proc~write_vts->proc~initialize~5 proc~write_vts->none~write_dataarray proc~write_vts->none~write_geo program~stringifor_test_csv_naive_parser stringifor_test_csv_naive_parser program~stringifor_test_csv_naive_parser->proc~read_file program~stringifor_test_csv_naive_parser->proc~write_file~3 program~stringifor_test_csv_naive_parser~2 stringifor_test_csv_naive_parser program~stringifor_test_csv_naive_parser~2->proc~read_file program~stringifor_test_csv_naive_parser~2->proc~write_file~3 program~stringifor_test_parse_large_csv stringifor_test_parse_large_csv program~stringifor_test_parse_large_csv->proc~read_file program~stringifor_test_parse_large_csv~2 stringifor_test_parse_large_csv program~stringifor_test_parse_large_csv~2->proc~read_file program~volatile_doctest~1030 volatile_doctest program~volatile_doctest~1030->proc~encode program~volatile_doctest~1104 volatile_doctest program~volatile_doctest~1104->proc~read_line program~volatile_doctest~1107 volatile_doctest program~volatile_doctest~1107->proc~read_file program~volatile_doctest~1107->proc~write_file program~volatile_doctest~1125 volatile_doctest program~volatile_doctest~1125->proc~read_file program~volatile_doctest~1125->proc~write_file program~volatile_doctest~115 volatile_doctest program~volatile_doctest~115->proc~encode program~volatile_doctest~26 volatile_doctest program~volatile_doctest~26->proc~read_file program~volatile_doctest~26->proc~write_file~3 program~volatile_doctest~319 volatile_doctest program~volatile_doctest~319->proc~decode program~volatile_doctest~321 volatile_doctest program~volatile_doctest~321->proc~read_line program~volatile_doctest~415 volatile_doctest program~volatile_doctest~415->proc~read_file~3 program~volatile_doctest~444 volatile_doctest program~volatile_doctest~444->proc~read_file program~volatile_doctest~664 volatile_doctest program~volatile_doctest~664->proc~read_file program~volatile_doctest~664->proc~write_file~3 program~volatile_doctest~789 volatile_doctest program~volatile_doctest~789->proc~read_file~3 program~volatile_doctest~8 volatile_doctest program~volatile_doctest~8->proc~decode program~volatile_doctest~964 volatile_doctest program~volatile_doctest~964->proc~read_file program~vtk_fortran_write_vtm vtk_fortran_write_vtm program~vtk_fortran_write_vtm->proc~initialize~5 program~vtk_fortran_write_vtm->none~write_block proc~write_data write_data program~vtk_fortran_write_vtm->proc~write_data program~vtk_fortran_write_vtr vtk_fortran_write_vtr program~vtk_fortran_write_vtr->proc~initialize~5 program~vtk_fortran_write_vtr->none~write_dataarray program~vtk_fortran_write_vtr->none~write_fielddata program~vtk_fortran_write_vtr->none~write_geo program~vtk_fortran_write_vts vtk_fortran_write_vts program~vtk_fortran_write_vts->proc~initialize~5 proc~write_data~2 write_data program~vtk_fortran_write_vts->proc~write_data~2 program~vtk_fortran_write_vtu vtk_fortran_write_vtu program~vtk_fortran_write_vtu->proc~initialize~5 proc~write_data~3 write_data program~vtk_fortran_write_vtu->proc~write_data~3 program~vtk_fortran_write_vtu~2 vtk_fortran_write_vtu program~vtk_fortran_write_vtu~2->proc~initialize~5 proc~write_data~4 write_data program~vtk_fortran_write_vtu~2->proc~write_data~4 interface~glob glob interface~glob->proc~glob_string proc~glob_character string%glob_character interface~glob->proc~glob_character none~glob string%glob none~glob->proc~glob_string none~glob->proc~glob_character proc~parse_scratch_files vtm_file%parse_scratch_files proc~parse_scratch_files->none~write_block proc~write_connectivity xml_writer_abstract%write_connectivity proc~write_connectivity->none~write_dataarray proc~write_data->none~write_dataarray proc~write_data->none~write_geo proc~write_data~2->none~write_dataarray proc~write_data~2->none~write_geo proc~write_data~3->none~write_dataarray proc~write_data~3->proc~write_connectivity proc~write_data~3->none~write_geo proc~write_data~4->none~write_dataarray proc~write_data~4->proc~write_connectivity proc~write_data~4->none~write_geo proc~write_fielddata1_rank0->none~write_dataarray proc~write_geo_rect_data3_rank1_r4p xml_writer_abstract%write_geo_rect_data3_rank1_R4P proc~write_geo_rect_data3_rank1_r4p->none~write_dataarray proc~write_geo_rect_data3_rank1_r8p xml_writer_abstract%write_geo_rect_data3_rank1_R8P proc~write_geo_rect_data3_rank1_r8p->none~write_dataarray proc~write_geo_strg_data1_rank2_r4p xml_writer_abstract%write_geo_strg_data1_rank2_R4P proc~write_geo_strg_data1_rank2_r4p->none~write_dataarray proc~write_geo_strg_data1_rank2_r8p xml_writer_abstract%write_geo_strg_data1_rank2_R8P proc~write_geo_strg_data1_rank2_r8p->none~write_dataarray proc~write_geo_strg_data1_rank4_r4p xml_writer_abstract%write_geo_strg_data1_rank4_R4P proc~write_geo_strg_data1_rank4_r4p->none~write_dataarray proc~write_geo_strg_data1_rank4_r8p xml_writer_abstract%write_geo_strg_data1_rank4_R8P proc~write_geo_strg_data1_rank4_r8p->none~write_dataarray proc~write_geo_strg_data3_rank1_r4p xml_writer_abstract%write_geo_strg_data3_rank1_R4P proc~write_geo_strg_data3_rank1_r4p->none~write_dataarray proc~write_geo_strg_data3_rank1_r8p xml_writer_abstract%write_geo_strg_data3_rank1_R8P proc~write_geo_strg_data3_rank1_r8p->none~write_dataarray proc~write_geo_strg_data3_rank3_r4p xml_writer_abstract%write_geo_strg_data3_rank3_R4P proc~write_geo_strg_data3_rank3_r4p->none~write_dataarray proc~write_geo_strg_data3_rank3_r8p xml_writer_abstract%write_geo_strg_data3_rank3_R8P proc~write_geo_strg_data3_rank3_r8p->none~write_dataarray proc~write_geo_unst_data1_rank2_r4p xml_writer_abstract%write_geo_unst_data1_rank2_R4P proc~write_geo_unst_data1_rank2_r4p->none~write_dataarray proc~write_geo_unst_data1_rank2_r8p xml_writer_abstract%write_geo_unst_data1_rank2_R8P proc~write_geo_unst_data1_rank2_r8p->none~write_dataarray proc~write_geo_unst_data3_rank1_r4p xml_writer_abstract%write_geo_unst_data3_rank1_R4P proc~write_geo_unst_data3_rank1_r4p->none~write_dataarray proc~write_geo_unst_data3_rank1_r8p xml_writer_abstract%write_geo_unst_data3_rank1_R8P proc~write_geo_unst_data3_rank1_r8p->none~write_dataarray proc~write_pvts write_pvts proc~write_pvts->none~write_dataarray program~volatile_doctest~353 volatile_doctest program~volatile_doctest~353->proc~read_lines program~volatile_doctest~729 volatile_doctest program~volatile_doctest~729->proc~read_lines program~vtk_fortran_write_pvts vtk_fortran_write_pvts program~vtk_fortran_write_pvts->proc~write_vts program~vtk_fortran_write_pvts->proc~write_pvts program~vtk_fortran_write_volatile vtk_fortran_write_volatile program~vtk_fortran_write_volatile->proc~write_check program~vtk_fortran_write_volatile->proc~write_slave none~write_geo->proc~write_geo_rect_data3_rank1_r4p none~write_geo->proc~write_geo_rect_data3_rank1_r8p none~write_geo->proc~write_geo_strg_data1_rank2_r4p none~write_geo->proc~write_geo_strg_data1_rank2_r8p none~write_geo->proc~write_geo_strg_data1_rank4_r4p none~write_geo->proc~write_geo_strg_data1_rank4_r8p none~write_geo->proc~write_geo_strg_data3_rank1_r4p none~write_geo->proc~write_geo_strg_data3_rank1_r8p none~write_geo->proc~write_geo_strg_data3_rank3_r4p none~write_geo->proc~write_geo_strg_data3_rank3_r8p none~write_geo->proc~write_geo_unst_data1_rank2_r4p none~write_geo->proc~write_geo_unst_data1_rank2_r8p none~write_geo->proc~write_geo_unst_data3_rank1_r4p none~write_geo->proc~write_geo_unst_data3_rank1_r8p proc~finalize~5 vtm_file%finalize proc~finalize~5->proc~parse_scratch_files proc~glob_character->none~glob program~volatile_doctest~1058 volatile_doctest program~volatile_doctest~1058->none~glob program~volatile_doctest~334 volatile_doctest program~volatile_doctest~334->none~glob program~volatile_doctest~426 volatile_doctest program~volatile_doctest~426->none~glob program~volatile_doctest~468 volatile_doctest program~volatile_doctest~468->interface~glob program~volatile_doctest~498 volatile_doctest program~volatile_doctest~498->interface~glob program~volatile_doctest~511 volatile_doctest program~volatile_doctest~511->none~glob proc~initialize~4 vtm_file%initialize proc~initialize~4->proc~finalize~5

Source Code

   elemental function upper(self)
   !< Return a string with all uppercase characters.
   !<
   !<```fortran
   !< type(string) :: astring
   !< logical      :: test_passed(1)
   !< astring = 'Hello WorLD!'
   !< test_passed(1) = astring%upper()//''=='HELLO WORLD!'
   !< print '(L1)', all(test_passed)
   !<```
   !=> T <<<
   class(string), intent(in) :: self  !< The string.
   type(string)              :: upper !< Upper case string.
   integer                   :: n1    !< Characters counter.
   integer                   :: n2    !< Characters counter.

   if (allocated(self%raw)) then
      upper = self
      do n1=1, len(self%raw)
         n2 = index(LOWER_ALPHABET, self%raw(n1:n1))
         if (n2>0) upper%raw(n1:n1) = UPPER_ALPHABET(n2:n2)
      enddo
   endif
   endfunction upper