// AddSliceStringKey marshals the given []string s
546411
func (enc *Encoder) AddSliceStringKey(k string, s []string) {
	enc.SliceStringKey(k, s)
}
1015056
func isStringInSlice(term string, list []string) bool {
	for _, found := range list {
		if term == found {
			return true
		}
	}
	return false
}
352875
func (enc *Encoder) SliceStringKey(k string, s []string) {
	enc.ArrayKey(k, EncodeArrayFunc(func(enc *Encoder) {
		for _, str := range s {
			enc.String(str)
		}
	}))
}
186583
func (ss stringSet) add(keys ...string) {
	for _, key := range keys {
		ss[key] = struct{}{}
	}
}
618317
func StringSliceReverse(in []string) (out []string) {
	for i := len(in) - 1; i >= 0; i-- {
		out = append(out, in[i])
	}
	return
}
494446
func stringSlicetoStringPointerSlice(s []string) []*string {
	o := []*string{}
	for _, str := range s {
		nstr := str
		o = append(o, &nstr)
	}
	return o
}
1293981
func ToStringKeys(keys KeyList, filter func(string) bool) StringKeys {
	if keys == nil {
		return nil
	}
	if strKeys, ok := keys.(StringKeys); ok {
		return strKeys
	}
	strs := make([]string, 0, keys.Len())
	for i := 0; i < keys.Len(); i++ {
		value := typeconv.ToString(keys.Key(i))
		if filter == nil || filter(value) {
			strs = append(strs, value)
		}
	}
	return StringKeys(strs)
}
805729
func (s *StreamEncoder) AddString(v string) {
	s.Encoder.writeByte('"')
	s.Encoder.writeString(v)
	s.Encoder.writeByte('"')
	s.Encoder.writeByte(s.delimiter)
}
424032
func (p *parser) parseSliceSuffix(x Expr) Expr {
	lbrack := p.nextToken()
	var lo, hi, step Expr
	if p.tok != COLON {
		y := p.parseExpr(false)

		// index x[y]
		if p.tok == RBRACK {
			rbrack := p.nextToken()
			return &IndexExpr{X: x, Lbrack: lbrack, Y: y, Rbrack: rbrack}
		}

		lo = y
	}

	// slice or substring x[lo:hi:step]
	if p.tok == COLON {
		p.nextToken()
		if p.tok != COLON && p.tok != RBRACK {
			hi = p.parseTest()
		}
	}
	if p.tok == COLON {
		p.nextToken()
		if p.tok != RBRACK {
			step = p.parseTest()
		}
	}
	rbrack := p.consume(RBRACK)
	return &SliceExpr{X: x, Lbrack: lbrack, Lo: lo, Hi: hi, Step: step, Rbrack: rbrack}
}
198265
func (b *Builder) addString(v string) {
	strLen := uint(len(v))
	if strLen > 126 {
		// long string
		dst := b.buf.Grow(1 + 8 + strLen)
		dst[0] = 0xbf
		setLength(dst[1:], ValueLength(strLen), 8) // string length
		copy(dst[9:], v)                           // string data
	} else {
		dst := b.buf.Grow(1 + strLen)
		dst[0] = byte(0x40 + strLen) // short string (with length)
		copy(dst[1:], v)             // string data
	}
}
458882
func TextSlices(expected, actual []string) *Result {
	e := make([]string, len(expected))
	a := make([]string, len(actual))
	for i, str := range expected {
		e[i] = strings.TrimRight(str, "\n") + "\n"
	}
	for i, str := range actual {
		a[i] = strings.TrimRight(str, "\n") + "\n"
	}
	return sliceDiff(e, a)
}
298297
func JoinStringSlices(a []string, b []string) []string {
	if len(a)+len(b) == 0 {
		return nil
	}
	out := make([]string, 0, len(a)+len(b))
	out = append(out, a...)
	out = append(out, b...)
	return out
}
391744
func formatSliceString(kind reflect.Kind, sliceSize int) string {
	if sliceSize == -1 {
		return fmt.Sprintf("[]%v", kind)
	}
	return fmt.Sprintf("[%d]%v", sliceSize, kind)
}
253282
func flattenStringList(list []*string) []interface{} {
	vs := make([]interface{}, 0, len(list))
	for _, v := range list {
		vs = append(vs, *v)
	}
	return vs
}
1246389
func StringSlice(value []string, name, usage string) *[]string {
	p := new([]string)
	flag.Var(NewStringSlice(value, p), name, usage)
	return p
}
5108
func CopyStringMapSlices(a map[string][]string) map[string][]string {
	if a == nil {
		return nil
	}

	out := make(map[string][]string)
	for key, values := range a {
		vout := make([]string, len(values))
		copy(vout, values)
		out[key] = vout
	}

	return out
}
1012706
func (s Session) AddEncryptionKey(method, key string) Session {
	if key == "" {
		return s.AddEncryptionMethod(method)
	}
	v := make([]byte, 0, 512)
	v = append(v, method...)
	v = appendRune(v, attributesDelimiter)
	v = append(v, key...)
	return s.append(TypeEncryptionKey, v)
}