// Return true if the string appears in string slice.
484095
func sliceContainsStr(possibleSlice interface{}, str string) bool {
	switch possibleSlice.(type) {
	case []string:
		for _, elem := range possibleSlice.([]string) {
			if elem == str {
				return true
			}
		}
	}
	return false
}
46545
func (jsonTag TagJSON) HasString() bool {
	for _, tag := range strings.Split(string(jsonTag), ",")[1:] {
		if tag == "string" {
			return true
		}
	}
	return false
}
655256
func (v Value) IsSlice() bool {
	_, ok := v.data.(Slice)
	return ok
}
1330148
func contains(haystack []string, needle string) bool {
	for _, s := range haystack {
		if needle == strings.TrimFunc(s, func(r rune) bool { return r == '"' }) {
			return true
		}
	}
	return false
}
539507
func (t *ImmutableTree) String() string {
	leaves := []string{}
	t.Iterate(func(key []byte, val []byte) (stop bool) {
		leaves = append(leaves, fmt.Sprintf("%x: %x", key, val))
		return false
	})
	return "Tree{" + strings.Join(leaves, ", ") + "}"
}
131894
func (s stringSet) contains(str string) bool {
	for _, ss := range s {
		if ss == str {
			return true
		}
	}
	return false
}
81331
func containsString(values []string, element string) bool {
	for _, value := range values {
		if value == element {
			return true
		}
	}
	return false
}
1266877
func (value Value) String() string {
	result := ""
	catchPanic(func() {
		result = value.string()
	})
	return result
}
874996
func StringSliceEquals(lhs []string, rhs []string) bool {
	if lhs == nil && rhs == nil {
		return true
	}

	if lhs == nil && rhs != nil {
		return false
	}

	if lhs != nil && rhs == nil {
		return false
	}

	if len(lhs) != len(rhs) {
		return false
	}

	for i := range lhs {
		if lhs[i] != rhs[i] {
			return false
		}
	}

	return true
}
988329
func StringSlice(v []string) []*string {
	out := make([]*string, len(v))
	for i := range v {
		out[i] = &v[i]
	}
	return out
}
576983
func ContainsStrings(coll []string, item string) bool {
	for _, a := range coll {
		if a == item {
			return true
		}
	}
	return false
}
858773
func IsPattern(str string) bool {
	for i := 0; i < len(str); i++ {
		if str[i] == '*' || str[i] == '?' {
			return true
		}
	}
	return false
}
1100352
func Contains(slice []string, item string) bool {
	set := make(map[string]struct{}, len(slice))
	for _, s := range slice {
		set[s] = struct{}{}
	}

	_, ok := set[item]
	return ok
}
228004
func StringSlice(s string) Slice {
	raw := []byte(s)
	l := len(raw)
	if l <= 126 {
		return Slice(append([]byte{byte(0x40 + l)}, raw...))
	}
	buf := make([]byte, 1+8+l)
	buf[0] = 0xbf
	binary.LittleEndian.PutUint64(buf[1:], uint64(l))
	copy(buf[1+8:], raw)
	return buf
}
108521
func stringToRuneSlice(input string) []rune {
	output := make([]rune, utf8.RuneCountInString(input))
	n := 0
	for _, r := range input {
		output[n] = r
		n++
	}
	return output
}
1020522
func (l *Lexer) isString(str string) bool {
	return strings.HasPrefix(l.input[l.pos:], str)
}
1258857
func IndexOfStringInSlice(searchFor string, searchIn []string) int {
	for idx, anItm := range searchIn {
		if anItm == searchFor {
			return idx
		}
	}
	return -1
}