is_eqv_str Function

public function is_eqv_str(str, ret)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: str
character(len=*), intent(in) :: ret

Return Value logical


Source Code

   logical function is_eqv_str (str, ret)
      implicit none
      character(*), intent(in) :: str, ret
      integer :: j

      is_eqv_str = .false.
      if (len(str) /= len(ret)) then
         is_eqv_str = .false.
      else
         is_eqv_str = .true. 
         do j = 1, len(str)
            is_eqv_str = (str(j:j) == ret(j:j)) .and. is_eqv_str
         end do
      end if 

   end function is_eqv_str