// Like DoString but panics on error
9919
func (L *State) MustDoString(str string) {
	if err := L.DoString(str); err != nil {
		panic(err)
	}
}
572552
func (v *typeInferrer) handleLikeExpr(x *ast.PatternLikeExpr) {
	x.SetType(types.NewFieldType(mysql.TypeLonglong))
	x.Type.Charset = charset.CharsetBin
	x.Type.Collate = charset.CollationBin
	x.Expr = v.addCastToString(x.Expr)
	x.Pattern = v.addCastToString(x.Pattern)
}
705534
func (b *builtinTrim2ArgsSig) evalString(row chunk.Row) (d string, isNull bool, err error) {
	var str, remstr string

	str, isNull, err = b.args[0].EvalString(b.ctx, row)
	if isNull || err != nil {
		return d, isNull, err
	}
	remstr, isNull, err = b.args[1].EvalString(b.ctx, row)
	if isNull || err != nil {
		return d, isNull, err
	}
	d = trimLeft(str, remstr)
	d = trimRight(d, remstr)
	return d, false, nil
}
628065
func (s *StructLog) ErrorString() string {
	if s.Err != nil {
		return s.Err.Error()
	}
	return ""
}
643526
func (e *Error) Error() string {
	loc := ""
	if e.Path != "" {
		line := ""
		if e.Line != 0 {
			line = fmt.Sprintf(":%d", e.Line)
		}
		loc = fmt.Sprintf("(in %s%s)", e.Path, line)
	}
	header := loc
	if e.Title != "" {
		if loc != "" {
			header = fmt.Sprintf("%s %s: ", e.Title, loc)
		} else {
			header = fmt.Sprintf("%s: ", e.Title)
		}
	}
	return fmt.Sprintf("%s%s Stack: %s", header, e.Description, e.Stack)
}
912119
func (o OSArch) String() string {
	return fmt.Sprintf("%v-%v", o.OS, o.Arch)
}
425152
func TypeString(str string) {
	cstr := C.CString(str)
	C.type_string(cstr)

	C.free(unsafe.Pointer(cstr))
}
914500
func (d *Context) EvalString(src string) {
	__src__ := C.CString(src)
	C._duk_eval_string(d.duk_context, __src__)
	C.free(unsafe.Pointer(__src__))
}
275368
func newStringNotLikeFunc(key Key, values ValueSet) (Function, error) {
	valueStrings, err := valuesToStringSlice(stringNotLike, values)
	if err != nil {
		return nil, err
	}

	return NewStringNotLikeFunc(key, valueStrings...)
}
718779
func TypeFromString(str string) Type {
	for t, d := range definitions {
		if d.name == str {
			return t
		}
	}

	panic("Type not registered")
}
733501
func (a *Assertion) ErrorString(expr interface{}, str string, msg ...interface{}) *Assertion {
	ErrorString(a.t, expr, str, msg...)
	return a
}
1270352
func (b *builtinRowSig) evalString(row chunk.Row) (string, bool, error) {
	panic("builtinRowSig.evalString() should never be called.")
}
895698
func (e *LikeExp) Build(db *DB, params Params) string {
	if len(e.values) == 0 {
		return ""
	}

	if len(e.escape)%2 != 0 {
		panic("LikeExp.Escape must be a slice of even number of strings")
	}

	var parts []string
	col := db.QuoteColumnName(e.col)
	for _, value := range e.values {
		name := fmt.Sprintf("p%v", len(params))
		for i := 0; i < len(e.escape); i += 2 {
			value = strings.Replace(value, e.escape[i], e.escape[i+1], -1)
		}
		if e.left {
			value = "%" + value
		}
		if e.right {
			value += "%"
		}
		params[name] = value
		parts = append(parts, fmt.Sprintf("%v %v {:%v}", col, e.Like, name))
	}

	if e.or {
		return strings.Join(parts, " OR ")
	}
	return strings.Join(parts, " AND ")
}
55310
func string_find(fnname string, recv Value, args Tuple, kwargs []Tuple) (Value, error) {
	return string_find_impl(fnname, string(recv.(String)), args, kwargs, true, false)
}
590531
func (e *Error) Error() string {
	nle := C.GoString(C.nl_geterror(e.errno))
	return fmt.Sprintf("%s: %s", e.msg, strings.ToLower(nle))
}
1034586
func (c *Config) ValueString(name string) (string, bool) {
	v, ok := c.attrs[name].(string)
	return v, ok
}
1013898
func (e *processConfigErr) Error() string {
	var msg string
	for _, err := range e.Warnings() {
		msg += err.Error() + "\n"
	}
	for _, err := range e.Errors() {
		msg += err.Error() + "\n"
	}
	return msg
}