• checks if a given string contains a given substring

    Parameters

    • haystack: string

      string that should be searched

    • needle: string

      substring that is searched for

    Returns boolean