// Contains returns whether or not the given IP address is within the specified
// IPRange.
198032
func (ipr *IPRange) Contains(ip net.IP) bool {
	// if ip is less than start, return false
	if bytes.Compare([]byte(ip), []byte(ipr.Start)) < 0 {
		return false
	}
	// return true if ip is less than or equal to end
	return bytes.Compare([]byte(ip), []byte(ipr.End)) <= 0
}
1168301
func contains(slice []string, str string) bool {
	for _, val := range slice {
		if val == strings.ToLower(str) {
			return true
		}
	}
	return false
}
1181267
func (it *Optional) Contains(ctx context.Context, val graph.Value) bool {
	checked := it.subIt.Contains(ctx, val)
	it.lastCheck = checked
	it.err = it.subIt.Err()
	it.result = val
	return true
}
837625
func (s *set) Contains(v interface{}) bool {
	_, ok := s.values[v]
	return ok
}
227698
func (r *Range) Contains(other Version) bool {
	return other.Compare(&r.Begin) >= 0 && other.Compare(&r.End) < 0
}
473027
func (set StringSet) Contains(i string) bool {
	_, found := set[i]
	return found
}
700464
func (s *OIDSet) Contains(oid *OID) bool {
	contains, _ := s.TestOIDSetMember(oid)
	return contains
}
543844
func Contains(exprs []Expression, e Expression) bool {
	for _, expr := range exprs {
		if e == expr {
			return true
		}
	}
	return false
}
1246691
func contains(list interface{}, value string) bool {
	switch l := list.(type) {
	case []interface{}:
		for _, v := range l {
			if v == value {
				return true
			}
		}
	}
	return false
}
95443
func (aSpace *addrSpace) contains(space string, nw *net.IPNet) bool {
	for k, v := range aSpace.subnets {
		if space == k.AddressSpace && k.ChildSubnet == "" {
			if nw.Contains(v.Pool.IP) || v.Pool.Contains(nw.IP) {
				return true
			}
		}
	}
	return false
}
182990
func (r Range) Contains(other Range) bool {
	return !r.Start.After(other.Start) && !r.End.Before(other.End)
}
1327255
func (ss *StringSet) Contains(subj string) bool {
	for _, s := range *ss {
		if glob.Glob(s, subj) {
			return true
		}
	}

	return false
}
918891
func (ipv6 IPv6Addr) Contains(sa SockAddr) bool {
	ipv6b, ok := sa.(IPv6Addr)
	if !ok {
		return false
	}

	return ipv6.ContainsNetwork(ipv6b)
}
128774
func (pt PrimitiveTypes) Contains(p PrimitiveType) bool {
	for _, v := range pt {
		if p == v {
			return true
		}
	}
	return false
}
106168
func Contains(base, cmp error) bool {
	// Check for the easy edge cases.
	if cmp == nil || base == nil {
		return false
	}
	if base == cmp {
		return true
	}

	switch v := base.(type) {
	case Error:
		for _, err := range v.ErrSet {
			if Contains(err, cmp) {
				return true
			}
		}
		return false
	default:
		return false
	}
}
669020
func (e *IndexEntry) Contains(t int64) bool {
	return e.MinTime <= t && e.MaxTime >= t
}
1169777
func (l ScopeList) Contains(scope string) bool {
	for _, s := range l {
		if scope == s {
			return true
		}
	}

	return false
}