// String converts the itemType into its source string.
// It is fantastically inefficient and should only be used for error messages.
184030
func (t itemType) String() string {
	for k, v := range builtinIdents {
		if v == t {
			return k
		}
	}
	for k, v := range arithmeticItemsBySymbol {
		if v == t {
			return k
		}
	}
	var r, ok = map[itemType]string{
		itemEOF:              "<eof>",
		itemEquals:           "=",
		itemError:            "<error>",
		itemText:             "<text>",
		itemLeftDelim:        "{",
		itemRightDelim:       "}",
		itemRightDelimEnd:    "/}",
		itemIdent:            "<ident>",
		itemDollarIdent:      "<$ident>",
		itemDotIdent:         "<.ident>",
		itemQuestionDotIdent: "<?.ident>",
		itemDotIndex:         "<.N>",
		itemQuestionDotIndex: "<?.N>",
		itemLeftBracket:      "[",
		itemRightBracket:     "]",
		itemQuestionKey:      "?[",
	}[t]
	if ok {
		return r
	}
	return fmt.Sprintf("item(%d)", t)
}
238299
func (gt GraphType) String() string {
	if gt == DIGRAPH {
		return "digraph"
	} else if gt == GRAPH {
		return "graph"
	} else if gt == SUBGRAPH {
		return "subgraph"
	}
	return "(invalid)"
}
311886
func (v MapType) String() string {
	x := (map[string]*Bonk)(v)
	return fmt.Sprint(x)
}
980862
func (i PatternType) String() string {
	switch i {
	case PatternTypeSolid:
		return "PatternTypeSolid"
	case PatternTypeSurface:
		return "PatternTypeSurface"
	case PatternTypeLinear:
		return "PatternTypeLinear"
	case PatternTypeRadial:
		return "PatternTypeRadial"
	case PatternTypeMesh:
		return "PatternTypeMesh"
	case PatternTypeRasterSource:
		return "PatternTypeRasterSource"
	default:
		return fmt.Sprintf("PatternType(%d)", i)
	}
}
266871
func (a Asset) String() string {
	if a.Type == "native" {
		return a.Type
	}
	return fmt.Sprintf("%s/%s/%s", a.Type, a.Code, a.Issuer)
}
901328
func (p ActionType) String() string {
	if p < (ActionTypeUnknown+1) || p >= ActionTypeCount {
		return ActionTypesToStrs[ActionTypeUnknown]
	}
	return ActionTypesToStrs[p]
}
54541
func (invtype InvType) String() string {
	if s, ok := ivStrings[invtype]; ok {
		return s
	}

	return fmt.Sprintf("Unknown InvType (%d)", uint32(invtype))
}
138229
func (li ListItem) String() string {
	ret := "<li" + li.Attrs() + ">"
	if li.Text != "" {
		if li.HTMLEncode {
			ret += html.EscapeString(li.Text)
		} else {
			ret += li.Text
		}
	}
	for _, el := range li.Body {
		ret += el.String()
	}
	ret += "</li>"
	return ret
}
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)
}
1141011
func (by *ByItems) String() string {
	if by.Desc {
		return fmt.Sprintf("%s true", by.Expr)
	}
	return by.Expr.String()
}
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 !!!"
	}
}
288931
func (c *ItemChange) String() string {
	switch c.Type {
	case added:
		return fmt.Sprintf("setting added: %v = %v", c.Key, c.NewValue)
	case modified:
		return fmt.Sprintf("setting modified: %v = %v (was %v)",
			c.Key, c.NewValue, c.OldValue)
	case deleted:
		return fmt.Sprintf("setting deleted: %v (was %v)", c.Key, c.OldValue)
	}
	return fmt.Sprintf("unknown setting change type %d: %v = %v (was %v)", c.Type, c.Key, c.NewValue, c.OldValue)
}
752344
func (t PrimitiveType) String() string {
	var v string
	switch t {
	case NullType:
		v = "null"
	case IntegerType:
		v = "integer"
	case StringType:
		v = "string"
	case ObjectType:
		v = "object"
	case ArrayType:
		v = "array"
	case BooleanType:
		v = "boolean"
	case NumberType:
		v = "number"
	default:
		v = "<invalid>"
	}
	return v
}
54803
func (l lineType) String() string {
	str := ""
	for _, c := range l {
		str += string(c.chr)
	}
	return str
}
88708
func (c *Change) String() string {
	switch c.Type {
	case Add:
		return fmt.Sprintf("Added %s at %s", c.After.String(), c.Path)
	case Remove:
		return fmt.Sprintf("Removed %s from %s", c.Before.String(), c.Path)
	case Mod:
		return fmt.Sprintf("Changed %s to %s at %s", c.Before.String(), c.After.String(), c.Path)
	default:
		panic("nope")
	}
}
446584
func (c *Capture) String() string {
	return string(c.text[c.Index : c.Index+c.Length])
}
599638
func (t Type) String() string {
	switch t {
	case REQ:
		return "REQ"
	case REP:
		return "REP"
	case DEALER:
		return "DEALER"
	case ROUTER:
		return "ROUTER"
	case PUB:
		return "PUB"
	case SUB:
		return "SUB"
	case XPUB:
		return "XPUB"
	case XSUB:
		return "XSUB"
	case PUSH:
		return "PUSH"
	case PULL:
		return "PULL"
	case PAIR:
		return "PAIR"
	case STREAM:
		return "STREAM"
	}
	return "<INVALID>"
}