matches Function

public function matches(string, substring)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: string
character(len=*), intent(in) :: substring

Return Value logical


Called by

proc~~matches~~CalledByGraph proc~matches matches proc~scan_contain scan_contain proc~scan_contain->proc~matches

Source Code

  function matches( string, substring )
    !-----------------------------------------------------------------------
    !
    ! ... .TRUE. if string is contained in substring, .FALSE. otherwise
    !
    IMPLICIT NONE
    !
    CHARACTER (LEN=*), INTENT(IN) :: string, substring
    LOGICAL                       :: matches
    INTEGER                       :: l

    l=index (string, substring)
    if (l.ge.1) then
       matches = .TRUE.
    else
       matches = .FALSE.
    endif
    RETURN
  end function matches