fdoc

functionremove_blankspure

pure character(len=len(s)-count_blanks(s)) function remove_blanks(s) result(t)

s without blanks and tabs.

Arguments

NameTypeIntentAttributesDescription
scharacter(len=*)in

the string

Result

NameTypeAttributesDescription
tcharacter(len=len(s)-count_blanks(s))private

Source

Show the code
pure function remove_blanks(s) result(t)
    character(len=*), intent(in) :: s   !! the string
    character(len=len(s) - count_blanks(s)) :: t
    integer :: k, n
    n = 0
    do k = 1, len(s)
        if (s(k:k) == ' ' .or. s(k:k) == achar(9)) cycle
        n = n + 1
        t(n:n) = s(k:k)
    end do
end function remove_blanks

Graphs

Called by