//NewStringSimple creates a new StringAttribute with a simple
//int initial value.
431324
func NewStringSimple(s string) StringAttribute {
	result := &StringSimple{
		NewAttribute(NORMAL, nil, nil),
	}
	result.Set(s)
	return result
}
1372531
func AssetString(name string) (string, error) {
	data, err := Asset(name)
	return string(data), err
}
691398
func NewStringPtr(val string) *string {
	ptrValue := new(string)
	*ptrValue = val
	return ptrValue
}
697370
func NewStringValue(t int64, v string) Value {
	return StringValue{unixnano: t, value: v}
}
1266076
func (i *Iter) InitString(f Form, src string) {
	i.p = 0
	if len(src) == 0 {
		i.setDone()
		i.rb.nsrc = 0
		return
	}
	i.multiSeg = nil
	i.rb.initString(f, src)
	i.next = i.rb.f.nextMain
	i.asciiF = nextASCIIString
	i.info = i.rb.f.info(i.rb.src, i.p)
}
55274
func NewStringRule(key string, req bool, opts ...string) (*StringRule, error) {
	// Return error if key is empty
	if key == "" {
		return nil, EmptyKeyError
	}

	var def *string
	if len(opts) > 0 {
		def = &opts[0]
	}

	return &StringRule{
		key:      key,
		required: req,
		default_: def,
	}, nil
}
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)
	}
}
1051473
func NewStringNotLikeFunc(key Key, values ...string) (Function, error) {
	sset := set.CreateStringSet(values...)
	if err := validateStringLikeValues(stringNotLike, key, sset); err != nil {
		return nil, err
	}

	return &stringNotLikeFunc{stringLikeFunc{key, sset}}, nil
}
588088
func NewString(name string, description string, metadata *types.MetricMetadata, fields ...field.Field) String {
	if metadata == nil {
		metadata = &types.MetricMetadata{}
	}
	m := &stringMetric{metric{
		MetricInfo: types.MetricInfo{
			Name:        name,
			Description: description,
			Fields:      fields,
			ValueType:   types.StringType,
		},
		MetricMetadata: *metadata,
	}}
	registry.Add(m)
	return m
}
1039909
func (b *builtinBinSig) evalString(row chunk.Row) (string, bool, error) {
	val, isNull, err := b.args[0].EvalInt(b.ctx, row)
	if isNull || err != nil {
		return "", true, err
	}
	return fmt.Sprintf("%b", uint64(val)), false, nil
}
366562
func (n *NullInt) ParseStringValue(val string) error {
	if val == "" {
		return nil
	}

	intVal, err := strconv.Atoi(val)
	if err != nil {
		return err
	}

	n.Value = intVal
	n.IsSet = true

	return nil
}
1105454
func NewStringOrStringArrayWithStringArray(a []string) *StringOrStringArray {
	result := &StringOrStringArray{}
	result.StringArray = &a
	return result
}
1013793
func NewStringResponse(status int, body string) *http.Response {
	return &http.Response{
		Status:        strconv.Itoa(status),
		StatusCode:    status,
		Body:          NewRespBodyFromString(body),
		Header:        http.Header{},
		ContentLength: -1,
	}
}
67546
func (Attr *FloatAttribute) CheckSysValFromString(rawVal string) ([]byte, error) {
	f, err := strconv.ParseFloat(rawVal, 64)
	if err != nil {
		return nil, err
	}

	ret := PackFloatToBytes(f)
	return ret, nil
}
1196795
func NewStringNotEqualsIgnoreCaseFunc(key Key, values ...string) (Function, error) {
	sset := set.CreateStringSet(values...)
	if err := validateStringEqualsIgnoreCaseValues(stringNotEqualsIgnoreCase, key, sset); err != nil {
		return nil, err
	}

	return &stringNotEqualsIgnoreCaseFunc{stringEqualsIgnoreCaseFunc{key, sset}}, nil
}
368044
func NewStringLikeFunc(key Key, values ...string) (Function, error) {
	sset := set.CreateStringSet(values...)
	if err := validateStringLikeValues(stringLike, key, sset); err != nil {
		return nil, err
	}

	return &stringLikeFunc{key, sset}, nil
}
35572
func NewSet(key string, vals ...string) []*api.GenericResource {
	rs := make([]*api.GenericResource, 0, len(vals))

	for _, v := range vals {
		rs = append(rs, NewString(key, v))
	}

	return rs
}