text without trailing blanks and tabs.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | text |
the text to trim |
pure function trim_blanks(text) result(t) !! `text` without trailing blanks and tabs. character(len=*), intent(in) :: text !! the text to trim character(len=:), allocatable :: t integer :: n n = len(text) do while (n > 0) if (text(n:n) /= ' ' .and. text(n:n) /= achar(9)) exit n = n - 1 end do t = text(1:n) end function trim_blanks