Does the collection contain a given value
@param  mixed $needle the value to check for
@return bool
493961
public function contains($needle) : bool
    {
        foreach ($this as $k => $v) {
            if ($v === $needle) {
                return true;
            }
        }
        return false;
    }
1215036
protected function in_array($needle, $haystack)
    {
        return count(array_filter($haystack, function ($hay) use ($needle) {
            return $hay === $needle;
        })) > 0;
    }
536228
public static function assertContains($needle, array $array) {
        if (is_array($needle)) {
            foreach ($needle as $key) {
                if (!array_key_exists($key, $array)) {
                    throw new \InvalidArgumentException("[{$key}] was not be contained.");
                }
            }
            return;
        }
        
        if (is_string($needle)) {
            if (!array_key_exists($needle, $array)) {
                throw new \InvalidArgumentException("[{$needle}] was not be contained.");
            }  
            return;          
        }
        
        self::makeError('assertConatins can only used for string or array');
    }
1003507
public static function contains(string $haystack, string $needle, int $offset = 0): bool
    {
        return self::strpos($haystack, $needle, $offset) !== false;
    }
70432
public function has(string $needle): bool
    {
        $needle = $this->inputConv($needle);

        return \strpos($this->str, $needle) !== false;
    }
5987
public static function in_array_all($needles, $haystack)
    {
        foreach ($needles as $n) {
            if (!in_array($n, $haystack)) {
                return false;
            }
        }

        return true;
    }
128929
public function containCI($needle) {
        if (!$this->_isValid) {
            return $this;
        }
        if (mb_stripos($this->_unsafeVar, $needle, null, $this->conf['encoding']) === false) {
            $this->_isValid = false;
        }
        return $this;
    }
904553
public function containsAll($needles): bool
    {
        $needlesBag = $this->transformToBag($needles);

        return !array_diff($needlesBag, $this->bag);
    }
991230
public function match($needle, $haystack)
    {
        $len = strlen($needle);

        /** @noinspection SubStrUsedAsStrPosInspection */
        return $len === 0 || substr($haystack, 0, $len) === $needle;
    }
630345
public static function contains( $needle, $haystack, $strict = false )
    {
        foreach ( $haystack as $_index => $_value )
        {
            if ( is_string( $_value ) )
            {
                if ( 0 === strcasecmp( $needle, $_value ) )
                {
                    return true;
                }
            }
            else if ( in_array( $needle, $_value, $strict ) )
            {
                return true;
            }
        }

        return false;
    }
1128123
public static function contains($val, $needle): bool
    {
        if (!$val || !\is_string($val)) {
            return false;
        }

        if (\is_string($needle) || \is_int($needle)) {
            return \stripos($val, (string)$needle) !== false;
        }

        if (\is_array($needle)) {
            foreach ((array)$needle as $item) {
                if (\stripos($val, $item) !== false) {
                    return true;
                }
            }
        }

        return false;
    }
1310778
public static function in($needle, ?array $haystack = null, bool $strict = true): bool
    {
        // prevent errors
        if (!Any::isArray($haystack) || $needle === null) {
            return false;
        }

        return in_array($needle, $haystack, $strict);
    }
46043
public static boolean containsAny(final String value, final String[] needles, final boolean caseSensitive) {
        validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
        return Arrays.stream(needles).anyMatch(needle -> contains(value, needle, caseSensitive));
    }
160698
public function contains($needle, $flags = 0)
    {
        return ($flags & self::CASE_SENSITIVE) ? (strpos($this->getInternalValue(),
                $needle) !== false) : (stripos($this->getInternalValue(), $needle) !== false);
    }
1146110
public function arrayKeyExistsRecursiveExtended(string $needle, array $haystack): bool
    {
        $result = false;
        foreach ($haystack as $value) {
            if (true === is_array($value)) {
                $result = $this->arrayKeyExistsRecursive($needle, $value);
            }
            if (true === $result) {
                return $result;
            }
        }

        return $result;
    }
230905
public static function contains($haystack, $needle, $strict = false)
    {
        if ($haystack instanceof \ArrayObject) {
            $haystack = $haystack->getArrayCopy();
        }

        if ($haystack instanceof \SplFixedArray) {
            $haystack = $haystack->toArray();
        }

        \settype($strict, 'bool');

        if (false === $strict) {
            return \in_array($needle, $haystack, false);
        }

        return \in_array($needle, $haystack, true);
    }
76339
public static function contains($haystack, $needles)
    {
        $needles = (array) $needles;

        foreach ($needles as $needle) {
            if ($needle && strpos($haystack, $needle) !== false) {
                return true;
            }
        }

        return false;
    }