// KeyValToString constructs a list of string from the list of KeyVal
972929
func KeyValToString(list []KeyVal) []string {
	ret := make([]string, len(list))
	for i := range list {
		ret[i] = string(list[i])
	}
	return ret
}
668479
func (s SigningKeySigner) SignToString(
	ctx context.Context, data []byte) (sig string, err error) {
	return s.Key.SignToString(data)
}
1364293
func Uint32ToString(from uint32) (string, error) {
	return strconv.FormatUint(uint64(from), DefeultNumericBase), nil
}
453562
func (v *Value) bytesToString() string {
	bytes, _ := v.ToBytes()
	return string(bytes)
}
573731
func (s *Session) GetStrings(key string, def []string) []string {
	v, ok := s.Values[key]
	if !ok {
		return def
	}

	valinf := v.([]interface{})
	vals := make([]string, len(valinf))
	for i := 0; i < len(valinf); i++ {
		vals[i] = valinf[i].(string)
	}

	return vals
}
544334
func setToString(set map[string]bool) string {
	result := ""
	for item := range set {
		if result != "" {
			result += ", "
		}
		result += item
	}
	return result
}
322595
func MapToString(collection interface{}, transform func(x interface{}) string) []string {
	switch reflect.TypeOf(collection).Kind() {
	case reflect.Slice:
		var xs []string

		slice := reflect.ValueOf(collection)
		for i := 0; i < slice.Len(); i++ {
			xs = append(xs, transform(slice.Index(i).Interface()))
		}

		return xs
	default:
		panic(fmt.Sprintf("error while mapping array to string\nreceived a %T\n  %s\n", collection, collection))
	}
}
1174062
func NewValueString(v string) Value {
	return Value{
		typ:     TBinary,
		tbinary: unsafeStringToBytes(v),
	}
}
644601
func IntToString(intSl []int) (str []string) {
	for i := range intSl {
		number := intSl[i]
		text := strconv.Itoa(number)
		str = append(str, text)
	}
	return str
}
723059
func toString(val interface{}) string {
	switch actual := val.(type) {
	case string:
		return actual
	case int:
		return strconv.Itoa(actual)
	case float64:
		return strconv.FormatFloat(actual, 'f', -1, 64)
	case bool:
		return strconv.FormatBool(actual)
	default:
		panic("unexpected key type")
	}
}
696679
func ToString(value interface{}) string {
	if v, ok := value.([]string); ok {
		for _, s := range v {
			if s != "" {
				return s
			}
		}
		return ""
	} else if v, ok := value.(string); ok {
		return v
	} else if v, ok := value.([]interface{}); ok {
		for _, s := range v {
			if fmt.Sprint(s) != "" {
				return fmt.Sprint(s)
			}
		}
		return ""
	}
	return fmt.Sprintf("%v", value)
}
1024765
func (v *Value) ToString() (val string, ok bool) {
	switch v.vType {
	case typeString:
		val, ok = v.value.(string)
	default:
	}
	return
}
1179124
func (ns *Namespace) KeyVals(key interface{}, vals ...interface{}) (types.KeyValues, error) {
	return types.KeyValues{Key: key, Values: vals}, nil
}
103470
func ToStringMapStringE(i interface{}) (map[string]string, error) {
	var m = map[string]string{}

	switch v := i.(type) {
	case map[string]string:
		return v, nil
	case map[string]interface{}:
		for k, val := range v {
			m[ToString(k)] = ToString(val)
		}
		return m, nil
	case map[interface{}]string:
		for k, val := range v {
			m[ToString(k)] = ToString(val)
		}
		return m, nil
	case map[interface{}]interface{}:
		for k, val := range v {
			m[ToString(k)] = ToString(val)
		}
		return m, nil
	case string:
		err := jsonStringToObject(v, &m)
		return m, err
	default:
		return m, fmt.Errorf("unable to cast %#v of type %T to map[string]string", i, i)
	}
}
236925
func ValueToStrings(val Value) ([]string, bool) {
	if val == nil || val.Err() {
		return nil, false
	}
	switch v := val.(type) {
	case StringValue:
		return []string{v.Val()}, true
	case TimeValue:
		return []string{fmt.Sprintf("%v", v.Val())}, true
	case ByteSliceValue:
		return []string{string(v.Val())}, true
	case NumericValue, BoolValue, IntValue:
		return []string{val.ToString()}, true
	case Slice:
		if v.Len() == 0 {
			return nil, false
		}
		vals := make([]string, v.Len())
		for i, val := range v.SliceValue() {
			if val != nil {
				vals[i] = val.ToString()
			}
		}
		return vals, true
	}
	return nil, false
}
198643
func tostring(i interface{}) string {
	var r string
	switch x := i.(type) {
	case string:
		r = x
	case uint64:
		r = strconv.FormatUint(x, 10)
	case int64:
		r = strconv.FormatInt(x, 10)
	case uint:
		r = strconv.FormatUint(uint64(x), 10)
	case int:
		r = strconv.FormatInt(int64(x), 10)
	default:
		log.Panicf("Could not convert %v %t", x, x)
	}
	return r
}
219333
func (v *KeyValue_GetValue_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Key != nil {
		fields[i] = fmt.Sprintf("Key: %v", *(v.Key))
		i++
	}

	return fmt.Sprintf("KeyValue_GetValue_Args{%v}", strings.Join(fields[:i], ", "))
}