string_m.f90 Source File


Files dependent on this one

sourcefile~~string_m.f90~~AfferentGraph sourcefile~string_m.f90 string_m.f90 sourcefile~assert_m.f90 assert_m.f90 sourcefile~assert_m.f90->sourcefile~string_m.f90 sourcefile~intrinsic_array_s.f90 intrinsic_array_s.F90 sourcefile~intrinsic_array_s.f90->sourcefile~assert_m.f90

Contents

Source Code


Source Code

module string_m
  implicit none

contains  

   pure function string(number) result(number_as_string)
    integer, intent(in) :: number
    integer, parameter :: max_len=128
    character(len=max_len) :: untrimmed_string
    character(len=:), allocatable :: number_as_string

    write(untrimmed_string, *) number
    number_as_string = trim(adjustl(untrimmed_string))
  end function

end module string_m