int_to_string Function

public pure function int_to_string(i) result(s)

integer to string

Arguments

Type IntentOptional Attributes Name
integer(kind=ip), intent(in) :: i

Return Value type(string)


Source Code

    pure function int_to_string(i) result(s)
    !! integer to string
        type(string) :: s
        integer(ip),intent(in) :: i
        character(len=256) :: s_tmp
        write(s_tmp, '(I256)') i
        s%str = trim(adjustl(s_tmp))
    end function int_to_string