// GetSlice gets the slice of the data.
198176
func (db *DB) GetSlice(key []byte) (store.Slice, error) {
	if err := checkKeySize(key); err != nil {
		return nil, err
	}

	key = db.encodeKVKey(key)

	return db.bucket.GetSlice(key)
}
626632
func BoolSlice(v []bool) []*bool {
	out := make([]*bool, len(v))
	for i := range v {
		out[i] = &v[i]
	}
	return out
}
890358
func (v *Value) MustMSISlice() []map[string]interface{} {
	if s := v.MSISlice(); s != nil {
		return s
	}

	return v.data.([]map[string]interface{})
}
658185
func (e *Env) LoadSlice(s []string) {
	if len(s) == 0 {
		return
	}
	if e.env == nil {
		e.env = make(map[string]string, len(s))
	}
	for _, entry := range s {
		e.SetEntry(entry)
	}
}
124446
func TimeSlice(src []time.Time) []*time.Time {
	dst := make([]*time.Time, len(src))
	for i := 0; i < len(src); i++ {
		dst[i] = &(src[i])
	}
	return dst
}
429849
func (v *Value) CanSlice() bool {
	switch v.getResolvedValue().Kind() {
	case reflect.Array, reflect.Slice, reflect.String:
		return true
	}
	return false
}
1129702
func ReadSliceFrom(r io.Reader, rm ReaderMaker, slice interface{}) (int64, error) {
	sliceValue := reflect.ValueOf(slice)
	return ReadFunc(r, rm, func(reader io.ReaderFrom) {
		elem := reflect.ValueOf(reader).Elem()
		reflect.Append(sliceValue, elem)
	})
}
747759
func CopyByteSlice(in []byte) []byte {
	if in == nil {
		return nil
	}
	out := make([]byte, len(in))
	copy(out, in)
	return out
}
220968
func (roles Roles) StringSlice() []string {
	s := make([]string, 0)
	for _, r := range roles {
		s = append(s, r.String())
	}
	return s
}
883913
func (dt *DbfTable) GetRowAsSlice(row int) []string {

	s := make([]string, len(dt.Fields()))

	for i := 0; i < len(dt.Fields()); i++ {
		s[i] = dt.FieldValue(row, i)
	}

	return s
}
622999
func (h Hash) StringSlice(key string) []string {
	if value, ok := h[key]; ok {
		return value.StringSlice()
	}
	return []string{}
}
1345937
func (list *List) Slice(from, to int) []string {
	if list.length == 0 {
		return emptySlice()
	}
	if from >= list.length || to >= list.length || from < 0 || to < 0 || from > to {
		return emptySlice()
	}
	if from == to {
		return oneSlice(list.Get(from))
	}
	diff := to - from + 1
	result := make([]string, diff)
	tmp := list.first
	for i := 0; i < list.length; i++ {
		if i >= from && i <= to {
			result[i-from] = tmp.Content
		}
		if i >= to {
			break
		}
		tmp = tmp.Next
	}
	return result
}
585235
func CompareSlice(a, b [][]byte) int {
	i := 0
	for i < len(a) && i < len(b) {
		if v := bytes.Compare(a[i], b[i]); v == 0 {
			i++
			continue
		} else {
			return v
		}
	}

	if i < len(b) {
		// b is longer, so assume a is less
		return -1
	} else if i < len(a) {
		// a is longer, so assume b is less
		return 1
	} else {
		return 0
	}
}
927304
func StringSlice(s Interface) []string {
	slice := make([]string, 0)
	for _, item := range s.List() {
		v, ok := item.(string)
		if !ok {
			continue
		}

		slice = append(slice, v)
	}
	return slice
}
1017230
func unmarshalSlice(data Slice, v interface{}) (err error) {
	defer func() {
		if r := recover(); r != nil {
			if _, ok := r.(runtime.Error); ok {
				panic(r)
			}
			err = r.(error)
		}
	}()

	rv := reflect.ValueOf(v)
	if rv.Kind() != reflect.Ptr || rv.IsNil() {
		return &InvalidUnmarshalError{reflect.TypeOf(v)}
	}

	d := &decodeState{}
	// We decode rv not rv.Elem because the Unmarshaler interface
	// test must be applied at the top level of the value.
	d.unmarshalValue(data, rv)
	return d.savedError
}
1303375
func (r *Reader) ReadSlice(v []reflect.Value) {
	l := len(v)
	if !r.Simple {
		setReaderRef(r, nil)
	}
	for i := 0; i < l; i++ {
		r.ReadValue(v[i])
	}
	r.readByte()
}
61421
func PropSlice(slice string) Property {
	return Property{
		Name:  "Slice",
		Value: dbus.MakeVariant(slice),
	}
}