This function returns .true. if the pattern contains the caret character at the top that matches the beginning of a line.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | pattern |
pure function is_there_caret_at_the_top(pattern) result(res) implicit none character(*), intent(in) :: pattern character(:), allocatable :: buff logical :: res res = .false. buff = adjustl(pattern) if (len(buff) == 0) return res = buff(1:1) == '^' end function is_there_caret_at_the_top