// LVAsString returns string representation of a given LValue
// if the LValue is a string or number, otherwise an empty string.
433434
func LVAsString(v LValue) string {
	switch sn := v.(type) {
	case LString, LNumber:
		return sn.String()
	default:
		return ""
	}
}
595829
func toString(v Value) string {
	var buf bytes.Buffer
	path := make([]Value, 0, 4)
	writeValue(&buf, v, path)
	return buf.String()
}
394859
func (formatter *Formatter) ToString(data interface{}) string {
	if str, ok := data.(string); ok {
		return str
	}

	if byteSlice, ok := data.([]byte); ok {
		return string(byteSlice)
	}

	return fmt.Sprintf("%v", data)
}
1316869
func (l slaLevel) String() string {
	if l == slaNone {
		l = SLAUnsupported
	}
	return string(l)
}
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
}
83660
func randomString(l int) string {
	bs := make([]byte, l)
	for i := range bs {
		bs[i] = randomCharset[rand.Intn(len(randomCharset))]
	}
	return string(bs)
}
264806
func litToString(lit *ast.BasicLit) (v string) {
	if lit.Kind != token.STRING {
		panic("expected string")
	}
	if lit.Value[0] == '`' {
		return string(lit.Value[1 : len(lit.Value)-1])
	}
	v, _ = strconv.Unquote(string(lit.Value))
	return
}
100280
func (v *ListTypeVersioningV1) String() string {
	if v == nil {
		return "<nil>"
	}

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

	return fmt.Sprintf("ListTypeVersioningV1{%v}", strings.Join(fields[:i], ", "))
}
445781
func (svs ScoredValues) String() string {
	svss := []string{}
	for _, sv := range svs {
		svss = append(svss, sv.String())
	}
	return fmt.Sprintf("[%s]", strings.Join(svss, " / "))
}
756191
func (kv *KeyValSlice) String() string {
	b := &bytes.Buffer{}
	for k, v := range *kv {
		fmt.Fprintf(b, "%v:%v", k, v)
		fmt.Fprintf(b, " ")
	}
	return b.String()
}
915002
func (v FloatValue) String() string {
	return fmt.Sprintf("%v %v", time.Unix(0, v.unixnano), v.value)
}
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")
	}
}
1106893
func (v *LargeDeltas) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [10]string
	i := 0
	if v.B1 != nil {
		fields[i] = fmt.Sprintf("B1: %v", v.B1)
		i++
	}
	if v.B10 != nil {
		fields[i] = fmt.Sprintf("B10: %v", v.B10)
		i++
	}
	if v.B100 != nil {
		fields[i] = fmt.Sprintf("B100: %v", v.B100)
		i++
	}
	if v.CheckTrue != nil {
		fields[i] = fmt.Sprintf("CheckTrue: %v", *(v.CheckTrue))
		i++
	}
	if v.B1000 != nil {
		fields[i] = fmt.Sprintf("B1000: %v", v.B1000)
		i++
	}
	if v.CheckFalse != nil {
		fields[i] = fmt.Sprintf("CheckFalse: %v", *(v.CheckFalse))
		i++
	}
	if v.Vertwo2000 != nil {
		fields[i] = fmt.Sprintf("Vertwo2000: %v", v.Vertwo2000)
		i++
	}
	if v.ASet2500 != nil {
		fields[i] = fmt.Sprintf("ASet2500: %v", v.ASet2500)
		i++
	}
	if v.Vertwo3000 != nil {
		fields[i] = fmt.Sprintf("Vertwo3000: %v", v.Vertwo3000)
		i++
	}
	if v.BigNumbers != nil {
		fields[i] = fmt.Sprintf("BigNumbers: %v", v.BigNumbers)
		i++
	}

	return fmt.Sprintf("LargeDeltas{%v}", strings.Join(fields[:i], ", "))
}
290655
func (enc *Encoder) String(v string) {
	enc.grow(len(v) + 4)
	r := enc.getPreviousRune()
	if r != '[' {
		enc.writeTwoBytes(',', '"')
	} else {
		enc.writeByte('"')
	}
	enc.writeStringEscape(v)
	enc.writeByte('"')
}
1260673
func (v Value) ToString() string {
	if v.typ == Expression {
		return ""
	}
	return hack.String(v.val)
}
16660
func valueToString(f reflect.Value) []string {
	var v []string

	switch reflect.TypeOf(f.Interface()).Kind() {
	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
		v = []string{strconv.FormatInt(f.Int(), 10)}
	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
		v = []string{strconv.FormatUint(f.Uint(), 10)}
	case reflect.Float32:
		v = []string{strconv.FormatFloat(f.Float(), 'f', 4, 32)}
	case reflect.Float64:
		v = []string{strconv.FormatFloat(f.Float(), 'f', 4, 64)}
	case reflect.Bool:
		v = []string{strconv.FormatBool(f.Bool())}
	case reflect.Slice:
		for i := 0; i < f.Len(); i++ {
			if s := valueToString(f.Index(i)); len(s) == 1 {
				v = append(v, s[0])
			}
		}
	case reflect.String:
		v = []string{f.String()}
	}

	return v
}
812912
func (l LDFlags) String() string {
	var o []string
	keys := make([]string, 0, len(l))
	for k := range l {
		keys = append(keys, k)
	}
	sort.Strings(keys)
	for _, k := range keys {
		ss := l[k]
		if len(ss) == 0 {
			o = append(o, "-"+k)
			continue
		}
		for _, s := range ss {
			o = append(o, fmt.Sprintf(`-%s %s`, k, s))
		}
	}
	return strings.Join(o, " ")
}