This funciton returns .true. if the pattern contains the doller character at the end that matches the ending of a line.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | pattern |
pure function is_there_dollar_at_the_end(pattern) result(res) implicit none character(*), intent(in) :: pattern character(:), allocatable :: buff logical :: res res = .false. buff = trim(pattern) if (len(buff) == 0) return res = buff(len_trim(buff):len_trim(buff)) == '$' end function is_there_dollar_at_the_end