// newStringLikeFunc - returns new StringLike function.
356841
func newStringLikeFunc(key Key, values ValueSet) (Function, error) {
	valueStrings, err := valuesToStringSlice(stringLike, values)
	if err != nil {
		return nil, err
	}

	return NewStringLikeFunc(key, valueStrings...)
}
805872
func NewSubstringProcessor(index, length int) ProcessorFunc {
	return func(in string) (string, bool) {
		if length < 1 {
			return "", false
		}
		if index < 0 {
			index = 0
		}
		if index >= len(in) {
			return "", true
		}
		out := in[index:]
		if length > len(out) {
			length = len(out)
		}
		return out[:length], true
	}
}
601036
func NewStringMatcher(dictionary []string) *Matcher {
	m := new(Matcher)

	var d [][]byte
	for _, s := range dictionary {
		d = append(d, []byte(s))
	}

	m.buildTrie(d)

	return m
}
1317641
func LessFunc(l []string) func(i, j int) bool {
	return func(i, j int) bool {
		return l[i] < l[j]
	}
}
842642
func (i ifCond) matchFunc(a, b string) bool {
	return i.rex.MatchString(a)
}
935326
func NewString(name string) *String {
	v := new(String)
	publish(name, v)
	return v
}
774827
func NewStringEqualsFunc(key Key, values ...string) (Function, error) {
	sset := set.CreateStringSet(values...)
	if err := validateStringEqualsValues(stringEquals, key, sset); err != nil {
		return nil, err
	}

	return &stringEqualsFunc{key, sset}, nil
}
952930
func NewStringLiteral(pos int, line int, val string) *StringLiteral {
	return &StringLiteral{
		NodeType: NodeString,
		Loc:      Loc{pos, line},

		Value: val,
	}
}
696224
func newStringTables() *stringTables {
	return &stringTables{
		Tables:    make(map[int32]*stringTable),
		NameIndex: make(map[string]int32),
		nextIndex: 0,
	}
}
708628
func newStringNotEqualsFunc(key Key, values ValueSet) (Function, error) {
	valueStrings, err := valuesToStringSlice(stringNotEquals, values)
	if err != nil {
		return nil, err
	}

	return NewStringNotEqualsFunc(key, valueStrings...)
}
1275160
func builtinFunc(name string) func(js JSWriter, args []ast.Node) {
	var funcStart = "soy.$$" + name + "("
	return func(js JSWriter, args []ast.Node) {
		js.Write(funcStart)
		for i, arg := range args {
			if i != 0 {
				js.Write(",")
			}
			js.Write(arg)
		}
		js.Write(")")
	}
}
346839
func newStream(path string, fn streamFunc) *stream {
	return &stream{
		path: path,
		info: streamFuncs.add(fn),
	}
}
1181661
func NewStringTokenizer(sql string) *Tokenizer {
	buf := []byte(sql)
	return &Tokenizer{
		buf:     buf,
		bufSize: len(buf),
	}
}
1339047
func NewString(key, val string) *api.GenericResource {
	return &api.GenericResource{
		Resource: &api.GenericResource_NamedResourceSpec{
			NamedResourceSpec: &api.NamedGenericResource{
				Kind:  key,
				Value: val,
			},
		},
	}
}
431324
func NewStringSimple(s string) StringAttribute {
	result := &StringSimple{
		NewAttribute(NORMAL, nil, nil),
	}
	result.Set(s)
	return result
}
448148
func NewStrings(less func(x, y string) bool, cap int) *Strings {
	h := &Strings{}

	if less != nil {
		h.less = func(i, j int) bool {
			return less(h.list[i], h.list[j])
		}
	}
	if cap > 0 {
		h.list = make([]string, 0, cap)
	}
	return h
}
943537
func FSString(useLocal bool, name string) (string, error) {
	b, err := FSByte(useLocal, name)
	return string(b), err
}