functiontrim_lengthpureprivate
pure integer function trim_length(text) result(n)
The length of text without blanks at its end.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| text | character(len=*) | in | the text |
Result
| Name | Type | Attributes | Description |
|---|---|---|---|
| n | integer | private |
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