// SliceContainsStr returns 'true' if the slice contains the given value
773524
func SliceContainsStr(slice []string, value string) bool {
	for i := range slice {
		if slice[i] == value {
			return true
		}
	}
	return false
}
509604
func (dec *Decoder) SliceString(s *[]string) error {
	err := dec.Array(DecodeArrayFunc(func(dec *Decoder) error {
		var str string
		if err := dec.String(&str); err != nil {
			return err
		}
		*s = append(*s, str)
		return nil
	}))

	if err != nil {
		return err
	}
	return nil
}
1947
func (r *Allocator) contains(label *mcs.Label) (bool, uint64) {
	return r.r.Offset(label)
}
881580
func IsSlice(s interface{}) bool {
	return s != nil && reflect.TypeOf(s).Kind() == reflect.Slice
}
927401
func splitStr(path, sep string, n int) []string {
	splits := strings.SplitN(path, sep, n)
	// Add empty strings if we found elements less than nr
	for i := n - len(splits); i > 0; i-- {
		splits = append(splits, "")
	}
	return splits
}
655256
func (v Value) IsSlice() bool {
	_, ok := v.data.(Slice)
	return ok
}
1088307
func ContainsString(array []string, element string) bool {
	for _, e := range array {
		if element == e {
			return true
		}
	}
	return false
}
239427
func mapContains(m, subset map[string]interface{}) bool {
	for k, v := range subset {
		value, ok := m[k]
		if !ok || value != v {
			return false
		}
	}
	return true
}
396573
func ownTextSubstrSelector(val string) Selector {
	return func(n *html.Node) bool {
		text := strings.ToLower(nodeOwnText(n))
		return strings.Contains(text, val)
	}
}
270600
func StringSlice(val, sep string) ([]string, error) {
	return strings.Split(val, sep), nil
}
214814
func attributeContainsValue(attr html.Attribute, attribute, value string) bool {
	if attr.Key == attribute {
		for _, attrVal := range strings.Fields(attr.Val) {
			if attrVal == value {
				return true
			}
		}
	}
	return false
}
498806
func InStringSlice(slice []string, src string) bool {
	for _, s := range slice {
		if s == src {
			return true
		}
	}

	return false
}
908410
func inSlice(slice []string, s string) bool {
	for _, ss := range slice {
		if s == ss {
			return true
		}
	}
	return false
}
1056955
func (it *And) subItsContain(ctx context.Context, val graph.Value, lastResult graph.Value) bool {
	var subIsGood = true
	for i, sub := range it.internalIterators {
		subIsGood = sub.Contains(ctx, val)
		if !subIsGood {
			if lastResult != nil {
				for j := 0; j < i; j++ {
					it.internalIterators[j].Contains(ctx, lastResult)
				}
			}
			break
		}
	}
	return subIsGood
}
1327255
func (ss *StringSet) Contains(subj string) bool {
	for _, s := range *ss {
		if glob.Glob(s, subj) {
			return true
		}
	}

	return false
}
1325711
func containsValue(m map[string]string, val string) bool {
	for _, v := range m {
		if v == val {
			return true
		}
	}
	return false
}
605655
func containsTuple(nsElement string) (bool, []string) {
	tupleItems := []string{}
	if isTuple(nsElement) {
		if strings.ContainsAny(nsElement, "*") {
			// an asterisk covers all tuples cases (eg. /intel/mock/(host0;host1;*)/baz)
			// so to avoid retrieving the same metric more than once, return only '*' as a tuple's items
			tupleItems = []string{"*"}
		} else {
			tuple := strings.TrimSuffix(strings.TrimPrefix(nsElement, core.TuplePrefix), core.TupleSuffix)
			items := strings.Split(tuple, core.TupleSeparator)
			// removing all leading and trailing white space
			for _, item := range items {
				tupleItems = append(tupleItems, strings.TrimSpace(item))
			}
		}
		return true, tupleItems
	}
	return false, nil
}