// MaybeContainsValue returns true if key and time might exists in this file. This function
// could return true even though the actual point does not exist. For example, the key may
// exist in this file, but not have a point exactly at time t.
421174
func (t *TSMReader) MaybeContainsValue(key []byte, ts int64) bool {
	return t.index.MaybeContainsValue(key, ts)
}
1118195
func (d *ClientDigestsFile) Contains(plat string, ref *api.ObjectRef) bool {
	for _, e := range d.entries {
		if e.plat == plat && proto.Equal(ref, e.ref) {
			return true
		}
	}
	return false
}
37502
func (c *ConfigFile) MustValueSet(section, key string, defaultVal ...string) (string, bool) {
	val, err := c.GetValue(section, key)
	if len(defaultVal) > 0 && (err != nil || len(val) == 0) {
		c.SetValue(section, key, defaultVal[0])
		return defaultVal[0], true
	}
	return val, false
}
116934
func (p *TSimpleJSONProtocol) safePeekContains(b []byte) bool {
	for i := 0; i < len(b); i++ {
		a, _ := p.reader.Peek(i + 1)
		if len(a) < (i+1) || a[i] != b[i] {
			return false
		}
	}
	return true
}
1126581
func TitleContains(tab *Tab, searchTitle string) ConditionalFunc {
	return func(tab *Tab) bool {
		if pageTitle, err := tab.GetTitle(); err == nil && strings.Contains(pageTitle, searchTitle) {
			return true
		}
		return false
	}
}
1357925
func (f FileStat) MaybeContainsKey(key []byte) bool {
	return bytes.Compare(f.MinKey, key) >= 0 || bytes.Compare(key, f.MaxKey) <= 0
}
1261427
func Value(keyvals []interface{}, key interface{}) interface{} {
	for i := 0; i < 2*(len(keyvals)/2); i += 2 {
		if keyvals[i] == key {
			return keyvals[i+1]
		}
	}
	return nil
}
785565
func isValue(raw interface{}) (interface{}, bool) {
	if raw == nil {
		return raw, true
	}
	_, ook := isObject(raw)
	_, aok := isArray(raw)
	if ook || aok {
		return nil, false
	}
	return raw, true
}
1220851
func (d Data) KeyExists(key string) bool {
	_, found := d.Values[key]
	return found
}
547753
func (d *indirectIndex) MaybeContainsKey(key []byte) bool {
	return bytes.Compare(key, d.minKey) >= 0 && bytes.Compare(key, d.maxKey) <= 0
}
1235710
func Contains(expectedValue string) *containsMatcher {
	matcher := new(containsMatcher)
	matcher.expectedValue = expectedValue
	return matcher
}
277205
func StringArrayContainsValue(array []string, value string) bool {
	for _, item := range array {
		if item == value {
			return true
		}
	}
	return false
}
1094798
func (p FilterPolicy) MayContain(filter, key []byte) bool {
	return Filter(filter).MayContain(key)
}
1140874
func isEmptyValue(v reflect.Value, tinfos *TypeInfos, deref, checkStruct bool) bool {
	switch v.Kind() {
	case reflect.Invalid:
		return true
	case reflect.Array, reflect.Map, reflect.Slice, reflect.String:
		return v.Len() == 0
	case reflect.Bool:
		return !v.Bool()
	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
		return v.Int() == 0
	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
		return v.Uint() == 0
	case reflect.Float32, reflect.Float64:
		return v.Float() == 0
	case reflect.Interface, reflect.Ptr:
		if deref {
			if v.IsNil() {
				return true
			}
			return isEmptyValue(v.Elem(), tinfos, deref, checkStruct)
		}
		return v.IsNil()
	case reflect.Struct:
		return isEmptyStruct(v, tinfos, deref, checkStruct)
	}
	return false
}
983851
func (f *Flag) NeedsExtraValue() bool {
	// Explicit over implicit
	if f.value.Type() == reflect.TypeOf(new([]bool)).Elem() ||
		f.value.Type() == reflect.TypeOf(new(bool)).Elem() {
		return false
	}
	if _, ok := f.value.Interface().(Help); ok {
		return false
	}
	return true
}
1247082
func (v *Oid) Contains(o *Oid) bool {
	if o == nil || len(v.Value) < len(o.Value) {
		return false
	}
	for i := 0; i < len(o.Value); i++ {
		if v.Value[i] != o.Value[i] {
			return false
		}
	}
	return true
}
704701
func IsValue(node Expr) bool {
	switch v := node.(type) {
	case *SQLVal:
		switch v.Type {
		case StrVal, HexVal, IntVal, ValArg:
			return true
		}
	}
	return false
}