// CopyStrings makes a deep copy of the passed in string slice and returns
// the copy.
516902
func CopyStrings(in []string) []string {
	if in == nil {
		return nil
	}

	out := make([]string, len(in))
	copy(out, in)

	return out
}
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
}
1114017
func copyHeaders(destination http.Header, source *http.Header) {
	for k, v := range *source {
		vClone := make([]string, len(v))
		copy(vClone, v)
		destination[k] = vClone
	}
}
1319454
func Int64sToStrings(ints []int64) []string {
	strs := make([]string, len(ints))
	for i := range ints {
		strs[i] = com.ToStr(ints[i])
	}
	return strs
}
387175
func copyMap(in map[string]interface{}, replace func(string) string) (out map[string]interface{}) {
	out = make(map[string]interface{})
	for key, value := range in {
		if replace != nil {
			key = replace(key)
		}
		out[key] = value
	}
	return
}
150901
func CopyContents(dst, src string) error {
	srcF, err := os.Open(src)
	if err != nil {
		return err
	}
	defer srcF.Close()

	dstDir, _ := filepath.Split(dst)
	if dstDir != "" {
		err := os.MkdirAll(dstDir, 0755)
		if err != nil {
			return err
		}
	}

	dstF, err := os.Create(dst)
	if err != nil {
		return err
	}
	defer dstF.Close()

	if _, err := io.Copy(dstF, srcF); err != nil {
		return err
	}

	return nil
}
340569
func (j *JsonQuery) ArrayOfStrings(s ...string) ([]string, error) {
	array, err := j.Array(s...)
	if err != nil {
		return []string{}, err
	}
	toReturn := make([]string, len(array))
	for index, val := range array {
		toReturn[index], err = stringFromInterface(val)
		if err != nil {
			return toReturn, err
		}
	}
	return toReturn, nil
}
399619
func (t Triple) Strings() []string {
	acc := make([]string, 0, 4)
	acc = append(acc, string(t.S))
	acc = append(acc, string(t.P))
	acc = append(acc, string(t.O))
	acc = append(acc, string(t.V))
	return acc
}
446641
func (d *Context) PushString(str string) string {
	__str__ := C.CString(str)
	var result string
	if s := C.duk_push_string(d.duk_context, __str__); s != nil {
		result = C.GoString(s)
	}
	C.free(unsafe.Pointer(__str__))
	return result
}
844879
func (c *JSONConfigContainer) DefaultStrings(key string, defaultval []string) []string {
	if v := c.Strings(key); v != nil {
		return v
	}
	return defaultval
}
839964
func CopyStringMapInterface(a map[string]interface{}) map[string]interface{} {
	if a == nil {
		return nil
	}

	out := make(map[string]interface{})
	for key, value := range a {
		out[key] = value
	}

	return out
}
214579
func CoerceStrings(v interface{}) []string {
	switch val := v.(type) {
	case string:
		if val == "" {
			return nil
		}
		return strings.Split(val, ",")
	case []string:
		return val
	case []interface{}:
		sva := make([]string, 0)
		for _, av := range val {
			switch aval := av.(type) {
			case string:
				sva = append(sva, aval)
			default:
				sv, err := CoerceString(av)
				if err == nil && sv != "" {
					sva = append(sva, sv)
				}
			}
		}
		return sva
	}
	return []string{CoerceStringShort(v)}
}
1291404
func copyBytes(src []byte) []byte {
	if src == nil {
		return nil
	}
	dst := make([]byte, len(src))
	copy(dst, src)
	return dst
}
578220
func CopyMap(m map[string]string) map[string]string {
	if m == nil {
		return nil
	}
	r := map[string]string{}
	for k, v := range m {
		r[k] = v
	}
	return r
}
694077
func (m *Meta) CopyValues(i interface{}, values []interface{}, cols ...string) {
	ptr := reflects.Ptr(i)
	for i, f := range cols {
		values[i] = m.fieldMap[f].Get(ptr)
	}
}
282004
func AppendStr(strs []string, str string) []string {
	for _, s := range strs {
		if s == str {
			return strs
		}
	}
	return append(strs, str)
}
578785
func copyRows(rows []map[string]dosa.FieldValue) []map[string]dosa.FieldValue {
	copied := make([]map[string]dosa.FieldValue, len(rows))
	for i, row := range rows {
		copied[i] = copyRow(row)
	}
	return copied
}