// Delimiters sets the start and end delimiters of the template.
353806
func Delimiters(start, end string) Option {
	return func(t *Template) {
		t.startDelim = start
		t.endDelim = end
	}
}
1117421
func (r *Rule) Strings() (strs []String) {
	var size C.int
	C.rule_strings(r.cptr, nil, &size)
	if size == 0 {
		return
	}
	ptrs := make([]*C.YR_STRING, int(size))
	C.rule_strings(r.cptr, &ptrs[0], &size)
	for _, ptr := range ptrs {
		strs = append(strs, String{ptr})
	}
	return
}
1148791
func TrimStrings(items []string) []string {
	ret := make([]string, len(items))
	for i, item := range items {
		ret[i] = strings.TrimSpace(item)
	}
	return ret
}
1351259
func (k *Key) Float64s(delim string) []float64 {
	vals, _ := k.parseFloat64s(k.Strings(delim), true, false)
	return vals
}
887783
func PrintDelimited(stat *pb.InstructionStat, reader io.Reader, writer io.Writer, delimiter string, lineSperator string) error {
	return ProcessMessage(reader, func(encodedBytes []byte) error {
		var row *Row
		var err error
		// fmt.Printf("chan input encoded: %s\n", string(encodedBytes))
		if row, err = DecodeRow(encodedBytes); err != nil {
			return fmt.Errorf("Failed to decode byte: %v", err)
		}
		stat.InputCounter++

		var written = 0

		// fmt.Printf("> len=%d row:%s\n", len(decodedObjects), decodedObjects[0])
		if written, err = fprintRow(writer, 0, delimiter, row.K...); err != nil {
			return fmt.Errorf("Failed to write row: %v", err)
		}
		if _, err := fprintRow(writer, written, delimiter, row.V...); err != nil {
			return fmt.Errorf("Failed to write row: %v", err)
		}

		if _, err := writer.Write([]byte("\n")); err != nil {
			return fmt.Errorf("Failed to write line separator: %v", err)
		}
		stat.OutputCounter++
		return nil
	})
}
1152237
func (k *Key) Uint64s(delim string) []uint64 {
	vals, _ := k.parseUint64s(k.Strings(delim), true, false)
	return vals
}
570526
func (e Encoder) AppendStrings(dst []byte, vals []string) []byte {
	major := majorTypeArray
	l := len(vals)
	if l <= additionalMax {
		lb := byte(l)
		dst = append(dst, byte(major|lb))
	} else {
		dst = appendCborTypePrefix(dst, major, uint64(l))
	}
	for _, v := range vals {
		dst = e.AppendString(dst, v)
	}
	return dst
}
1103269
func EvaluateTemplateStringToStringWithDelimiter(
	templateContent string,
	inventory interface{},
	funcs template.FuncMap,
	delimLeft, delimRight string,
) (string, error) {
	return evaluateTemplate(templateContent, inventory, funcs, delimLeft, delimRight, []string{})
}
999620
func Concaterator(iterators ...Iterator) Iterator {
	return func() Token {
		for len(iterators) > 0 {
			t := iterators[0]()
			if t != EOF {
				return t
			}
			iterators = iterators[1:]
		}
		return EOF
	}
}
1086690
func init() {
	AddInitEventHandler(func(typeOf Event, value interface{}) (responseOf EventResponse) {
		if typeOf == REVEL_BEFORE_MODULES_LOADED {
			RegisterTemplateLoader(GO_TEMPLATE, func(loader *TemplateLoader) (TemplateEngine, error) {
				// Set the template delimiters for the project if present, then split into left
				// and right delimiters around a space character

				TemplateDelims := Config.StringDefault("template.go.delimiters", "")
				var splitDelims []string
				if TemplateDelims != "" {
					splitDelims = strings.Split(TemplateDelims, " ")
					if len(splitDelims) != 2 {
						log.Fatalln("app.conf: Incorrect format for template.delimiters")
					}
				}

				return &GoEngine{
					loader:          loader,
					templateSet:     template.New("__root__").Funcs(TemplateFuncs),
					templatesByName: map[string]*GoTemplate{},
					splitDelims:     splitDelims,
				}, nil
			})
		}
		return
	})
}
852203
func (i Iterator) Tokens() []Token {
	var out []Token
	for t := i(); t != EOF; t = i() {
		out = append(out, t)
	}
	return out
}
1273990
func FileAndExtNoDelimiter(in string) (string, string) {
	file, ext := fileAndExt(in, fpb)
	return file, strings.TrimPrefix(ext, ".")
}
185915
func (ns *Namespace) Split(a interface{}, delimiter string) ([]string, error) {
	aStr, err := cast.ToStringE(a)
	if err != nil {
		return []string{}, err
	}

	return _strings.Split(aStr, delimiter), nil
}
1026706
func (s *ListObjectsOutput) SetDelimiter(v string) *ListObjectsOutput {
	s.Delimiter = &v
	return s
}
915715
func splitDelimmitedString(str string, regex string) []string {
	var result []string

	str = strings.TrimSpace(str)

	if str != "" {
		reg := regexp.MustCompile(regex)
		indices := reg.FindAllStringIndex(str, -1)

		result = make([]string, len(indices)+1)

		lastStart := 0
		for i, val := range indices {
			result[i] = str[lastStart:val[0]]
			lastStart = val[1]
		}

		result[len(indices)] = str[lastStart:]

		// Special case of single empty string
		if len(result) == 1 && result[0] == "" {
			result = make([]string, 0, 0)
		}
	}

	return result
}
166056
func (t *Template) Delims(left, right string) *Template {
	return t.replaceTmpl(t.tmpl.Delims(left, right))
}
476931
func FormatHeaders(headers http.Header, seperator string) string {
	redactedHeaders := RedactHeaders(headers)
	sort.Strings(redactedHeaders)

	return strings.Join(redactedHeaders, seperator)
}