// WriteString writes a string to response write
9810
func (ctx *Context) WriteString(content string) (int, error) {
	return io.WriteString(ctx.ResponseWriter, content)
}
993478
func (c *Call) String() string {
	var buf bytes.Buffer

	// Write name.
	if c.Name != "" {
		buf.WriteString(c.Name)
	} else {
		buf.WriteString("!UNNAMED")
	}

	// Write opening.
	buf.WriteByte('(')

	// Write child list.
	for i, child := range c.Children {
		if i > 0 {
			buf.WriteString(", ")
		}
		buf.WriteString(child.String())
	}

	// Separate children and args, if necessary.
	if len(c.Children) > 0 && len(c.Args) > 0 {
		buf.WriteString(", ")
	}

	// Write arguments in key order.
	for i, key := range c.keys() {
		if i > 0 {
			buf.WriteString(", ")
		}
		// If the Arg value is a Condition, then don't include
		// the equal sign in the string representation.
		switch v := c.Args[key].(type) {
		case *Condition:
			fmt.Fprintf(&buf, "%v %s", key, v.String())
		default:
			fmt.Fprintf(&buf, "%v=%s", key, formatValue(v))
		}
	}

	// Write closing.
	buf.WriteByte(')')

	return buf.String()
}
1108994
func (b *StringBuilder) WriteByte(c byte) error {
	b.copyCheck()
	b.buf = append(b.buf, c)
	return nil
}
549489
func (be *BinaryEncoder) WriteString(value string) {
	be.WriteInt16(int16(len(value)))
	copy(be.buffer[be.pos:], value)
	be.pos += len(value)
}
443041
func WriteString(w http.ResponseWriter, s string) error {
	w.Header().Set("Content-Type", "text/plain; charset=utf-8")

	if _, err := io.WriteString(w, s); err != nil {
		return err
	}

	return nil
}
1205923
func (r *response) String() string {
	if r == nil {
		return "Nil"
	}
	return fmt.Sprintf("{packet nil: %v, local: %v, remote: %v, changed: %v, other: %v, identical: %v}",
		r.packet == nil,
		r.mappedAddr,
		r.serverAddr,
		r.changedAddr,
		r.otherAddr,
		r.identical)
}
334256
func (w *ResponseRecorder) Writef(format string, a ...interface{}) (n int, err error) {
	return fmt.Fprintf(w, format, a...)
}
1264888
func (ed *eventData) writeString(data string) {
	ed.buffer.WriteString(data)
	ed.buffer.WriteByte(0)
}
1196634
func (w *Writer) WriteString(msg string) {
	w.b = AppendString(w.b, msg)
}
854205
func (r *Response) String() string {
	if r.Error != nil {
		return ""
	}

	r.populateResponseByteBuffer()

	return r.internalByteBuffer.String()
}
435102
func (s *String) WriteTo(w io.Writer) (n int64, err error) {
	// unsigned short, can't use Short
	var length = uint16(len(s.Value))
	err = binary.Write(w, binary.BigEndian, &length)
	if err != nil {
		return
	}

	// Then write string bytes
	_, err = w.Write([]byte(s.Value))
	if err != nil {
		return
	}
	n += int64(length)

	return
}
342559
func (out *DataOutputImpl) WriteStringSet(m map[string]bool) error {
	if m == nil {
		return out.WriteInt(0)
	}
	err := out.WriteInt(int32(len(m)))
	if err != nil {
		return err
	}
	for value, _ := range m {
		err = out.WriteString(value)
		if err != nil {
			return err
		}
	}
	return nil
}
564713
func (a *Writer) WriteString(str string) (int, error) {
	return a.Write([]byte(str))
}
1329816
func (b *ByteBuf) WriteString(v string) error {
	_, err := b.Write(StringToSlice(v))
	return err
}
887639
func (this *Response) ToString() (string, error) {
	bytes, err := this.ReadAll()
	if err != nil {
		return "", err
	}

	return string(bytes), nil
}
949054
func WriteBodyString(res *http.Response, body string) {
	res.Body = StringReader(body)
	res.ContentLength = int64(len(body))
}
348638
func (f *formatter) formatString(b []byte, s string) {
	if len(s) > len(b) {
		f.err = ErrFieldTooLong
		return
	}
	ascii := toASCII(s)
	copy(b, ascii)
	if len(ascii) < len(b) {
		b[len(ascii)] = 0
	}
}