fdoc

functiontrim_lengthpureprivate

pure integer function trim_length(text) result(n)

The length of text without blanks at its end.

Arguments

NameTypeIntentAttributesDescription
textcharacter(len=*)in

the text

Result

NameTypeAttributesDescription
nintegerprivate

Calls

Source

Show the code
pure function trim_length(text) result(n)
    character(len=*), intent(in) :: text    !! the text
    integer :: n

    n = len(text)
    do while (n > 0)
        if (.not. is_blank(text(n:n))) exit
        n = n - 1
    end do
end function trim_length

Graphs

Calls

Called by