// NewString returns a new String given a reporter used to report failures
// and value to be inspected.
//
// reporter should not be nil.
//
// Example:
//  str := NewString(t, "Hello")
481910
func NewString(reporter Reporter, value string) *String {
	return &String{makeChain(reporter), value}
}
1174062
func NewValueString(v string) Value {
	return Value{
		typ:     TBinary,
		tbinary: unsafeStringToBytes(v),
	}
}
981446
func NewStringLit(p Pos, val string) *StringLit {
	return &StringLit{posValue{p: p, Val: val}}
}
780268
func NewStringResponder(status int, body string) Responder {
	return ResponderFromResponse(NewStringResponse(status, body))
}
540613
func ErrorString(t testing.TB, expr interface{}, str string, args ...interface{}) {
	if IsNil(expr) { // 空值，必定没有错误
		assert(t, false, args, []interface{}{"ErrorString 失败，实际值为 Nil：[%T]", expr})
		return
	}

	if err, ok := expr.(error); ok {
		index := strings.Index(err.Error(), str)
		assert(t, index >= 0, args, []interface{}{"Error 失败，实际类型为[%T]", expr})
	}
}
421536
func (c Column) UpdateString() string {
	return fmt.Sprintf("%s = :%s", c.Name, c.Name)
}
763098
func (iter *Iterator) ReadString() (ret string) {
	c := iter.nextToken()
	if c == '"' {
		for i := iter.head; i < iter.tail; i++ {
			c := iter.buf[i]
			if c == '"' {
				ret = string(iter.buf[iter.head:i])
				iter.head = i + 1
				return ret
			} else if c == '\\' {
				break
			} else if c < ' ' {
				iter.ReportError("ReadString",
					fmt.Sprintf(`invalid control character found: %d`, c))
				return
			}
		}
		return iter.readStringSlowPath()
	} else if c == 'n' {
		iter.skipThreeBytes('u', 'l', 'l')
		return ""
	}
	iter.ReportError("ReadString", `expects " or n, but found `+string([]byte{c}))
	return
}
1196634
func (w *Writer) WriteString(msg string) {
	w.b = AppendString(w.b, msg)
}
1197234
func NewString(items ...string) String {
	ss := String{}
	ss.Insert(items...)
	return ss
}
900261
func NewStringTsCell(v string) TsCell {
	tsc := riak_ts.TsCell{VarcharValue: []byte(v)}
	tsct := riak_ts.TsColumnType_VARCHAR
	return TsCell{columnType: tsct, cell: &tsc}
}
1333965
func NewStringTypeParser(setter SetStringFunc) *StringTypeParser {
	parser := new(StringTypeParser)
	parser.setter = setter
	return parser
}
708628
func newStringNotEqualsFunc(key Key, values ValueSet) (Function, error) {
	valueStrings, err := valuesToStringSlice(stringNotEquals, values)
	if err != nil {
		return nil, err
	}

	return NewStringNotEqualsFunc(key, valueStrings...)
}
431324
func NewStringSimple(s string) StringAttribute {
	result := &StringSimple{
		NewAttribute(NORMAL, nil, nil),
	}
	result.Set(s)
	return result
}
446622
func NewString(vals ...V) StringA {
	a := &arg{}

	d := Default.Get(vals)
	a.defv = d

	f := A(flagA).Get(vals)
	if f != nil {
		f := f.(flagT)
		a.defv = flag.String(f.name, f.defv.(string), f.usage)
	}

	as := a.getA()
	return func(s string) V {
		return as(s)
	}
}
1020112
func NewScannerString(s string) *Scanner {
	sc := Scanner{in: bufio.NewReader(strings.NewReader(s))}
	return &sc
}
275368
func newStringNotLikeFunc(key Key, values ValueSet) (Function, error) {
	valueStrings, err := valuesToStringSlice(stringNotLike, values)
	if err != nil {
		return nil, err
	}

	return NewStringNotLikeFunc(key, valueStrings...)
}
657737
func newSynth(client *Client, defName string, id int32) *Synth {
	return &Synth{
		DefName: defName,
		ID:      id,
		client:  client,
	}
}