Compares two geometries to ascertain whether an element is inside another one
@param {aria.utils.DomBeans:Geometry} needle
@param {aria.utils.DomBeans:Geometry|aria.utils.Dom:VIEWPORT:property} haystack
@return {Boolean}
425963
function (needle, haystack) {
            needle.width = needle.width || 0;
            needle.height = needle.height || 0;
            if (haystack == this.VIEWPORT) {
                return this.isInViewport({
                    left : needle.x,
                    top : needle.y
                }, {
                    width : needle.width,
                    height : needle.height
                });
            }
            haystack.width = haystack.width || 0;
            haystack.height = haystack.height || 0;
            if (needle.x < haystack.x || needle.y < haystack.y || needle.x + needle.width > haystack.x + haystack.width
                    || needle.y + needle.height > haystack.y + haystack.height) {
                return false;
            }
            return true;
        }
853922
public static function contains($haystack, $needle)
    {
        // Check arguments
        if (empty($haystack) || empty($needle)) {
            return false;
        }

        // Needle is string
        if (!is_array($needle)) {
            return mb_strpos($haystack, $needle) !== false;
        }

        // Needle is array, check if haystack contains all items
        foreach ((array)$needle as $str_needle) {
            if (!empty($str_needle) && mb_strpos($haystack, $str_needle) === false) {
                return false;
            }
        }

        return true;
    }
1191725
public static function within( $haystack, $needle, $offset = 0, $caseSensitive = false )
    {
        if ( false === $caseSensitive )
        {
            //	Case-insensitive
            return false !== stripos( $haystack, $needle, $offset );
        }

        //	Case-sensitive
        return false !== strpos( $haystack, $needle, $offset );
    }
569278
public static function array_ikey_exists($needle, $haystack) {
		if (! \is_array($haystack) || ! \count($haystack)) {
			return false;
		}
		$haystack = \array_keys($haystack);

		return (false !== static::array_isearch($needle, $haystack));
	}
1045059
public static function hasAllValuesMultiDimensional(array $haystack, array $needles)
    {
        $return = true;
        foreach ($needles as $needle) {
            if (!in_array($needle, $haystack)) {
                $return = false;
                break;
            }
        }

        return $return;
    }
1319325
def find(self, haystack, needle):
        
        try:
            qstatus = haystack.find(needle)
        except AttributeError:
            if needle in haystack:
                return True
            else:
                return False
        if qstatus == -1:
            return False
        elif qstatus != -1:
            return True
898160
function(needle, haystack) {
		var m = false;

		for (var i in haystack) {
			if (i === '*') m = '*';
			else if (urlglob(i, needle)) return i;
		}

		return m;
	}
801148
protected function wasDispatched($needle, array $haystack)
    {
        foreach ($haystack as $dispatched) {
            if ((is_string($dispatched) && ($dispatched === $needle || is_subclass_of($dispatched, $needle))) ||
                $dispatched instanceof $needle) {
                return true;
            }
        }

        return false;
    }
702805
public static function containsAll($haystack, array $needles)
    {
        foreach ($needles as $needle) {
            if ($needle != '' && mb_strpos($haystack, $needle) === false) {
                return false;
            }
        }

        return true;
    }
1202321
public static function hasAnyKey(array $haystack, ...$needles)
    {
        foreach ($needles as $needle) {
            if (array_key_exists($needle, $haystack)) {
                return true;
            }
        }

        return false;
    }
324604
public static function contains($haystack, $needle, $ignoreCase = false)
    {
        if ($ignoreCase) {
            $needle = strtolower($needle);
            $haystack = strtolower($haystack);
        }
        $pos = strpos($haystack, $needle);

        return !($pos === false);
    }
819572
public static function inArrayCaseInsensitive($needle, $haystack)
    {
        if (!$haystack || !is_array($haystack)) {
            return false;
        }
        $lcase = array();
        foreach ($haystack as $key => $val) {
            $lcase[$key] = strtolower($val);
        }
        return in_array(strtolower($needle), $lcase);
    }
927494
public static function contains(string $haystack, string $needle): bool
    {
        return mb_strpos($haystack, $needle, 0, 'UTF-8') !== false;
    }
903804
function _compare (hay, needle) {
    for(var i in set) {
      var x = u.get(hay, set[i]), y = needle[i]
      if(x !== y) return compare(x, y)
    }
    return 0
  }
1071991
function (needle, haystack, strict) {

            var found = false;

            strict = !!strict;

            $this.each(haystack, function (key) {
                /* jshint -W116 */
                if ((strict && haystack[key] === needle) || (!strict && haystack[key] == needle)) {
                    found = true;
                    return false;
                }
                /* jshint +W116 */
            });

            return found;
        }
1019286
public static function contains($haystack, $needle, $ignoreCase = false)
    {
        if ($ignoreCase) {
            return stripos($haystack, $needle) !== false;
        } else {
            return strpos($haystack, $needle) !== false;
        }

    }
31724
public static function hasBeginning(string $needle, string $haystack): bool
    {
        return $needle === '' || strpos($haystack, $needle) === 0;
    }