// Split slices an input string into all substrings separated by delimiter.
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
}
80839
func split(s string) <-chan string {
	ch := make(chan string)
	go func() {
		s = strings.Replace(s, " ", "", -1)
		if !strings.Contains(s, "(") {
			ch <- s
		} else {
			last := 0
			end := len(s)
			for info := range scan(s) {
				if last != info.openPos {
					ch <- s[last:info.openPos]
				}
				ch <- s[info.openPos:info.closePos]
				last = info.closePos
			}
			if last != end {
				ch <- s[last:]
			}
		}
		close(ch)
	}()
	return ch
}
51908
func (f File) Split(sep string) []string {
	pat := fmt.Sprintf("\r?\n{0,1}%s\r?\n{0,1}", regexp.QuoteMeta(sep))
	re := regexp.MustCompile(pat)
	return re.Split(f.String(), -1)
}
639610
func (n *node) split(pageSize int) []*node {
	var nodes []*node

	node := n
	for {
		// Split node into two.
		a, b := node.splitTwo(pageSize)
		nodes = append(nodes, a)

		// If we can't split then exit the loop.
		if b == nil {
			break
		}

		// Set node to b so it gets split on the next iteration.
		node = b
	}

	return nodes
}
856605
func (ca *CoreAdmin) Split(core string, targetCore ...string) (*SolrResponse, error) {
	if len(targetCore) < 2 {
		return nil, fmt.Errorf("You must specify at least 2 target cores")
	}
	params := &url.Values{}
	params.Add("core", core)
	for _, target := range targetCore {
		params.Add("targetCore", target)
	}
	return ca.Action("SPLIT", params)
}
162016
func SplitWhite(s string) ([]string, error) {
	reg, err := regexp.Compile("[ \t]+")
	if err != nil {
		return nil, err
	}
	s = reg.ReplaceAllString(s, " ")
	return strings.Split(s, " "), nil
}
89770
func (c Context) Split(s string, sep string) []string {
	return strings.Split(s, sep)
}
456608
func (c *Cluster) Split(regionID, newRegionID uint64, key []byte, peerIDs []uint64, leaderPeerID uint64) {
	c.SplitRaw(regionID, newRegionID, NewMvccKey(key), peerIDs, leaderPeerID)
}
56791
func (s *Semver) Split() (uint32, uint32, uint32) {
	return s.major, s.minor, s.patch
}
1212191
func Split(name, segment string) ([]string, error) {
	parts := []string{segment}

	if len(segment) == 0 {
		return parts, nil // let elsewhere handle the empty single segment
	}

	if segment[0] == '[' && segment[len(segment)-1] == ']' {
		parts = strings.Split(segment[1:len(segment)-1], "|")
		// zero length is checked in parseMultiple
		if len(parts) == 1 {
			return nil, errors.New("Single item in segment alternation for " + name + ".")
		}
	}

	return parts, nil
}
640890
func (m *Matter) split(data []byte, atEOF bool) (advance int, token []byte, err error) {
	if atEOF && len(data) == 0 {
		return 0, nil, nil
	}
	delim, err := sniffDelim(data)
	if err != nil {
		return 0, nil, err
	}
	if _, ok := m.handlers[delim]; !ok {
		return 0, nil, ErrUnknownDelim
	}
	if x := bytes.Index(data, []byte(delim)); x >= 0 {
		// check the next delim index
		if next := bytes.Index(data[x+len(delim):], []byte(delim)); next > 0 {
			return next + len(delim), dropSpace(data[:next+len(delim)]), nil
		}
		return len(data), dropSpace(data[x+len(delim):]), nil
	}
	if atEOF {
		return len(data), data, nil
	}
	return 0, nil, nil
}
999692
func splitAndTrim(input string) []string {
	result := strings.Split(input, ",")
	for i, r := range result {
		result[i] = strings.TrimSpace(r)
	}
	return result
}
175674
func Split(c rune) (l, m, t rune) {
	t = (c - 0xAC00) % 28
	m = ((c - 0xAC00 - t) % 588) / 28
	l = (c - 0xAC00) / 588

	l += LEAD_BASE
	m += MEDIAL_BASE
	if t != 0 {
		t += TAIL_BASE - 1
	}

	return
}
558346
func SplitString(b []byte) (content, rest []byte, err error) {
	k, content, rest, err := Split(b)
	if err != nil {
		return nil, b, err
	}
	if k == List {
		return nil, b, ErrExpectedString
	}
	return content, rest, nil
}
913864
func splitCommand(input string) []string {
	fields := strings.Fields(input)
	if num := strings.IndexAny(fields[0], "0123456789"); num != -1 {
		inputNumber := fields[0][num:]
		fields[0] = fields[0][:num]
		fields = append([]string{fields[0], inputNumber}, fields[1:]...)
	}
	return fields
}
924560
func split(data []byte) [][]byte {
	chunks := [][]byte{}

	start := 0
	dirDepth := 0
	for i, b := range data {
		switch b {
		case dirStartMark:
			dirDepth++
		case dirEndMark:
			dirDepth--
		case dirElementSep:
			if dirDepth == 0 {
				chunks = append(chunks, data[start:i+1])
				start = i + 1
			}
		}
	}
	chunks = append(chunks, data[start:])

	return chunks
}
365700
func splitLength(s string, length int) []string {
	var ret []string

	for len(s) > 0 {
		tmp := truncateString(s, length)
		if len(tmp) == 0 {
			// too short length, or invalid UTF-8 string
			break
		}
		ret = append(ret, tmp)
		s = s[len(tmp):]
	}

	return ret
}