// Pascal returns a Pascal-cased copy of the string s.
168322
func Pascal(s string) string {
	out := ""
	wasSpace := false
	for i, c := range removeCase(s, " ", unicode.ToLower) {
		if i == 0 || wasSpace {
			c = unicode.ToUpper(c)
		}
		wasSpace = c == ' '
		if !wasSpace {
			out += string(c)
		}
	}
	return out
}
552938
func UpperCamelCase(str string) string {
	pieces := split(str)

	for index, s := range pieces {
		pieces[index] = fmt.Sprintf(`%v%v`, strings.ToUpper(string(s[0])), strings.ToLower(s[1:]))
	}

	return strings.Join(pieces, ``)
}
569984
func Camel(s string) string {
	first := ' '
	for _, c := range s {
		if unicode.IsLetter(c) || unicode.IsNumber(c) {
			first = c
			break
		}
	}
	return strings.TrimSpace(string(unicode.ToLower(first)) + Pascal(s)[1:])
}
648006
func (primative *Primative) AsString() (string, error) {
	switch val := primative.value.(type) {
	case bool:
		strVal := "False"
		if val {
			strVal = "True"
		}
		return strVal, nil
	case float64:
		return strconv.FormatFloat(val, 10, -1, 64), nil
	case int64:
		return strconv.FormatInt(val, 10), nil
	case nil:
		return "Null", nil
	case string:
		return val, nil
	}

	msg := fmt.Sprintf("Could not convert value %s to type STRING", primative.value)
	return "", errors.New(msg)
}
1092875
func (t *UseNode) String() string {
	if l := len(t.Aliases); l > 0 {
		keys := make([]string, l)
		i := 0
		for orig := range t.Aliases {
			keys[i] = orig
			i++
		}
		sort.Strings(keys)
		res := make([]string, l)
		for i, orig := range keys {
			res[i] = orig + ": " + t.Aliases[orig]
		}
		return fmt.Sprintf("Use(%s with %s)", t.Tpl, strings.Join(res, ", "))
	}
	return fmt.Sprintf("Use(%s)", t.Tpl)
}
294548
func (v Variant) String() string {
	s, unamb := v.format()
	if !unamb {
		return "@" + v.sig.str + " " + s
	}
	return s
}
1118997
func (p *Pair) String() string {
	return fmt.Sprintf("(%v, %v)", p.X, p.Y)
}
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
}
524772
func (x duration) Binary(op syntax.Token, y starlark.Value, side starlark.Side) (starlark.Value, error) {
	switch y := y.(type) {
	case starlark.Int:
		switch {
		case op == syntax.STAR:
			return duration{x.Int.Mul(y)}, nil
		case op == syntax.SLASH && side == starlark.Left:
			return duration{x.Int.Div(y)}, nil
		}

	case duration:
		switch {
		case op == syntax.PLUS:
			return duration{x.Int.Add(y.Int)}, nil
		case op == syntax.MINUS && side == starlark.Left:
			return duration{x.Int.Sub(y.Int)}, nil
		case op == syntax.MINUS && side == starlark.Right:
			return duration{y.Int.Sub(x.Int)}, nil
		case op == syntax.SLASH && side == starlark.Left:
			return x.Int.Div(y.Int), nil
		case op == syntax.SLASH && side == starlark.Right:
			return y.Int.Div(x.Int), nil
		}
	}

	// All other combinations aren't supported.
	return nil, nil
}
759224
func (i Ident) String() string {
	if i.Schema.O == "" {
		return i.Name.O
	}
	return fmt.Sprintf("%s.%s", i.Schema, i.Name)
}
1131092
func (c *Constructors) String() string {
	var s string
	for k := range *c {
		s += k.String() + "=>" + "(func() interface {})" + "\t"
	}
	return s
}
1278904
func (k TokenKind) String() string {
	s := tokenName[k]
	if s == "" {
		return fmt.Sprintf("Token-%d", int(k))
	}
	return s
}
225440
func (t *token) String() string {
	if len(t.value) > 10 {
		return fmt.Sprintf("%s (line: %d, column: %d): %.10q...",
			t.t, t.line, t.column, t.value)
	}
	return fmt.Sprintf("%s (line: %d, column: %d): %q",
		t.t, t.line, t.column, t.value)
}
65280
func (v Value) String() string {
	switch v.t {
	case reflect.String:
		return v.s
	case reflect.Int:
		return strconv.Itoa(v.i)
	case reflect.Bool:
		return strconv.FormatBool(v.b)
	}

	return ""
}
777920
func (i FontSlant) String() string {
	switch i {
	case FontSlantNormal:
		return "FontSlantNormal"
	case FontSlantItalic:
		return "FontSlantItalic"
	case FontSlantOblique:
		return "FontSlantOblique"
	default:
		return fmt.Sprintf("FontSlant(%d)", i)
	}
}
200140
func (s *Set) String() string {
	// Print identifier
	str := "{ "

	// Check for empty set, print symbol if empty
	if s.Size() == 0 {
		return str + "Ø }"
	}

	// Print all elements
	for k := range s.m {
		// Print pairs separately
		if pair, ok := k.(Pair); ok {
			str = str + fmt.Sprintf("%v ", pair.String())
		} else {
			str = str + fmt.Sprintf("%v ", k)
		}
	}

	return str + "}"
}
1336692
func (gtidSet MariadbGTIDSet) String() string {
	s := make([]string, len(gtidSet))
	for i, gtid := range gtidSet {
		s[i] = gtid.String()
	}
	return strings.Join(s, ",")
}