Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | c1 | |||
character(len=*), | intent(in) | :: | c2 |
pure function same_part_of_suffix(c1,c2) result(retval) character(*), intent(in) :: c1, c2 character(:), allocatable :: retval character(:), allocatable :: rc1, rc2 integer :: n, i n = max(len_trim(c1), len_trim(c2)) allocate(character(n):: rc1, rc2) rc1 = reverse_utf8(c1) rc2 = reverse_utf8(c2) retval = same_part_of_prefix(rc1, rc2) retval = reverse_utf8(retval) end function same_part_of_suffix