// addString adds a string value to the buffer.
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
	}
}
336486
func (b *Bytes) WriteString(str string) (int, error) {
	return b.Write([]byte(str))
}
105592
func (f *Buffer) String() string {
	return string(f.Buff.Bytes()[f.Index:])
}
586044
func (b *buffer) String() string {
	return fmt.Sprintf("Buffer{id: %d, name: \"%s\", filename: \"%s\"}", b.Id(), b.Name(), b.FileName())
}
885313
func (enc *Encoder) AppendString(v string) {
	enc.grow(len(v) + 2)
	enc.writeByte('"')
	enc.writeStringEscape(v)
	enc.writeByte('"')
}
754857
func (w *ByteWriter) WriteString(val string, offset int) (int, error) {
	_, err := w.Write([]byte(val), offset)
	return offset + len(val), err
}
682754
func (enc *Encoder) AddStringKey(key, v string) {
	enc.StringKey(key, v)
}
9810
func (ctx *Context) WriteString(content string) (int, error) {
	return io.WriteString(ctx.ResponseWriter, content)
}
985787
func (p *TCompactProtocol) WriteString(value string) error {
	buf := make([]byte, len(value))
	strings.NewReader(value).Read(buf)
	return p.WriteBinary(buf)
}
711895
func (bi *BigInt) SetString(x string, base int) {
	bi.bigint.SetString(x, base)
}
1046396
func (c *Cell) SetString(s string) {
	c.Value = s
	c.formula = ""
	c.cellType = CellTypeString
}
498648
func (L *State) LoadString(s string) int {
	Cs := C.CString(s)
	defer C.free(unsafe.Pointer(Cs))
	return int(C.luaL_loadstring(L.s, Cs))
}
1086050
func (s *stringSet) Add(vs ...string) {
	for _, v := range vs {
		s.values[v] = struct{}{}
	}
}
272403
func (d *Datum) SetString(s string) {
	d.k = KindString
	sink(s)
	d.b = hack.Slice(s)
}
213155
func (s *Field) SetStringValue(v string) *Field {
	s.StringValue = &v
	return s
}
835367
func (s *Slice) WriteString(str string) (size int, err error) {
	*s = append(*s, str...)
	return len(str), nil
}
413347
func DumpToString(i interface{}) string {
	buf := new(bytes.Buffer)
	Dump(buf, i)
	return buf.String()
}