// String returns the string representation of a HeaderType.
768563
func (t HeaderType) String() string {
	switch t {
	case Noop:
		return "noop"
	case Error:
		return "error"
	case Done:
		return "done"
	case Overrun:
		return "overrun"
	default:
		return fmt.Sprintf("unknown(%d)", t)
	}
}
543197
func (a AuthorizationType) String() string {
	if Basic <= a && a <= OAuth {
		return authorizationTypes[a]
	}
	buf := make([]byte, 20)
	n := fmtInt(buf, uint64(a))
	return "%!AuthorizationType(" + string(buf[n:]) + ")"
}
161576
func (t TokenType) String() string {
	switch t {
	case ILLEGAL:
		return "ILLEGAL"
	case EOF:
		return "EOF"
	case EOL:
		return "EOL"
	case WHITESPACE:
		return "WHITESPACE"
	case COMMENT:
		return "COMMENT"
	case SEPARATOR:
		return "SEPARATOR"
	case NEGATION:
		return "NEGATION"
	case PATTERN:
		return "PATTERN"
	case ANY:
		return "ANY"
	default:
		return "BAD TOKEN"
	}
}
824239
func (h HealthcheckType) String() string {
	switch h {
	case HCTypeDNS:
		return "DNS"
	case HCTypeHTTP:
		return "HTTP"
	// TODO(angusc): Drop HTTPS as a separate type.
	case HCTypeHTTPS:
		return "HTTP" // NB: Not HTTPS
	case HCTypeICMP:
		return "ICMP"
	case HCTypeRADIUS:
		return "RADIUS"
	case HCTypeTCP:
		return "TCP"
	// TODO(angusc): Drop TCPTLS as a separate type.
	case HCTypeTCPTLS:
		return "TCP" // NB: Not TCPTLS
	case HCTypeUDP:
		return "UDP"
	}
	return "(unknown)"
}
798197
func (v SensorType) String() string {
	if v == DHT11 {
		return "DHT11"
	} else if v == DHT12 {
		return "DHT12"
	} else if v == DHT22 || v == AM2302 {
		return "DHT22|AM2302"
	} else {
		return "!!! unknown !!!"
	}
}
782206
func (a *Addr) String() string {
	if a.URL == nil {
		return a.Value
	}
	return a.URL.String()
}
152687
func (v *Xtruct2) String() string {
	if v == nil {
		return "<nil>"
	}

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

	return fmt.Sprintf("Xtruct2{%v}", strings.Join(fields[:i], ", "))
}
22516
func String(sv *hcsschema.Version) string {
	b, err := json.Marshal(sv)
	if err != nil {
		return ""
	}
	return string(b[:])
}
1302679
func (h Header) String() string {
	if h.Value == nil {
		return fmt.Sprintf("%s=nil", h.Key)
	}

	valueLen := len(h.Value)
	if valueLen == 0 {
		return fmt.Sprintf("%s=<empty>", h.Key)
	}

	truncSize := valueLen
	trunc := ""
	if valueLen > 50+15 {
		truncSize = 50
		trunc = fmt.Sprintf("(%d more bytes)", valueLen-truncSize)
	}

	return fmt.Sprintf("%s=%s%s", h.Key, strconv.Quote(string(h.Value[:truncSize])), trunc)
}
1037400
func (v *Xtruct3) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [4]string
	i := 0
	if v.StringThing != nil {
		fields[i] = fmt.Sprintf("StringThing: %v", *(v.StringThing))
		i++
	}
	if v.Changed != nil {
		fields[i] = fmt.Sprintf("Changed: %v", *(v.Changed))
		i++
	}
	if v.I32Thing != nil {
		fields[i] = fmt.Sprintf("I32Thing: %v", *(v.I32Thing))
		i++
	}
	if v.I64Thing != nil {
		fields[i] = fmt.Sprintf("I64Thing: %v", *(v.I64Thing))
		i++
	}

	return fmt.Sprintf("Xtruct3{%v}", strings.Join(fields[:i], ", "))
}
177016
func (t Token) String() string {
	switch t.Type {
	case ErrorToken:
		return ""
	case TextToken:
		return EscapeString(t.Data)
	case StartTagToken:
		return "<" + t.tagString() + ">"
	case EndTagToken:
		return "</" + t.tagString() + ">"
	case SelfClosingTagToken:
		return "<" + t.tagString() + "/>"
	case CommentToken:
		return "<!--" + t.Data + "-->"
	case DoctypeToken:
		return "<!DOCTYPE " + t.Data + ">"
	}
	return "Invalid(" + strconv.Itoa(int(t.Type)) + ")"
}
541292
func (v ByteView) String() string {
	if v.b != nil {
		return string(v.b)
	}
	return v.s
}
541649
func String(v interface{}, err error) (string, error) {
	if err != nil {
		return "", err
	}
	vs, ok := v.(string)
	if ok {
		return vs, nil
	}

	return "", newWrongTypeError(v, vs)
}
213944
func (v *Object) String() string {

	f, err := json.Marshal(v.data)
	if err != nil {
		return err.Error()
	}

	return string(f)

}
745666
func (blockID BlockID) String() string {
	return fmt.Sprintf(`%v:%v`, blockID.Hash, blockID.PartsHeader)
}
766431
func (s Signature) String() string {
	str := fmt.Sprintf(
		`keyId="%s",algorithm="%s",signature="%s"`,
		s.KeyID,
		s.Algorithm.name,
		s.Signature,
	)

	if len(s.Headers) > 0 {
		str += fmt.Sprintf(`,headers="%s"`, s.Headers.String())
	}

	return str
}
548491
func (h *Histogram) String() string {
	var b bytes.Buffer
	h.Print(&b)
	return b.String()
}