Splits the input
@param text
@param limit See java.util.Pattern.split
@return
508317
public String[] split(CharSequence text, int limit)
    {
        try
        {
            InputReader reader = Input.getInstance(text);
            List<String> list = split(reader, limit);
            return list.toArray(new String[list.size()]);
        }
        catch (IOException ex)
        {
            throw new IllegalArgumentException("can't happen", ex);
        }
    }
1033430
private String [] split (final String string, final String delim)
  {
    final List <String> result = new ArrayList <> ();

    final StringTokenizer stringTokenizer = new StringTokenizer (string, delim);
    while (stringTokenizer.hasMoreTokens ())
    {
      result.add (stringTokenizer.nextToken ());
    }

    return result.toArray (new String [result.size ()]);
  }
847909
public static String[] split(final String input, final char split) {
        int index = indexOf(input, split);
        int prevIndex = 0;
        final ArrayList<String> output = new ArrayList<String>();
        if (index == -1) {
            output.add(input);
            return output.toArray(new String[1]);
        }
        while (index != -1) {
            output.add(input.substring(prevIndex, index));
            prevIndex = index + 1;
            index = indexOf(input, split, index + 1);
        }
        output.add(input.substring(prevIndex, input.length()));
        return output.toArray(new String[output.size()]);
    }
362987
public static String[] splitString(String line) {
		int len=line.length();
		int wordCount=0;
		int pos=0;
		while(pos<len) {
			// Skip past blank space
			while(pos<len&&line.charAt(pos)<=' ') pos++;
			int start=pos;
			// Skip to the next blank space
			while(pos<len&&line.charAt(pos)>' ') pos++;
			if(pos>start) wordCount++;
		}

		String[] words=new String[wordCount];

		int wordPos=0;
		pos=0;
		while(pos<len) {
			// Skip past blank space
			while(pos<len&&line.charAt(pos)<=' ') pos++;
			int start=pos;
			// Skip to the next blank space
			while(pos<len&&line.charAt(pos)>' ') pos++;
			if(pos>start) words[wordPos++]=line.substring(start,pos);
		}

		return words;
	}
408801
private static void splitInSentences(HashSet<String> sentencesSet, String text) {
		
		if (inputType == inputTypes.PARAGRAPH) { // split in multiple sentences
			LinkedList<LinkedList<Word>> sentences = Splitting.tokenizeSentences(LVMorphologyReaderAndWriter.getAnalyzer(), text);
			for (LinkedList<Word> sentence : sentences) 
			{
				if(sentence != null)
				{
					String madeSentence = "";
					for(int w = 0; w < sentence.size(); w++)
					{
						madeSentence = madeSentence + " " + sentence.get(w);
					}
					madeSentence = madeSentence.trim();
					//pārbaudam, vai teikuma atšķiribas nav punkts teikuma beigas
					if(madeSentence.length() > 0 && madeSentence.lastIndexOf(".") >= 0) madeSentence = madeSentence.substring(0, madeSentence.length() - 1);
					sentencesSet.add(madeSentence.trim());
				}
			}
		} 
	}
350223
public static List<String> splitCommaSeparatedList(String text) {
    if (text == null || text.isEmpty()) {
      return Collections.emptyList();
    }
    Matcher matcher = pattern.matcher(text);
    List<String> parts = new ArrayList<String>();
    while(matcher.find()) {
      parts.add(matcher.group().trim());
    }
    return parts;
  }
161578
public List<String> splitWithDefaultSplitStrategy(String input) {
        if (input == null) {
            throw new NullPointerException(makeNullArgumentErrorMsg("input"));
        }
        return defaultSplitStrategy().split(input, IGNORED);
    }
341244
protected final function split($text, $keepEmpty = false)
    {
        $lines = array_map(function ($line) {
            return trim($line);
        }, explode("\n", $text));

        if (!$keepEmpty) {
            $lines = array_filter($lines);
            return array_values($lines);
        }

        return $lines;
    }
196267
@Override
  public Streamlet<R> split(Map<String, SerializablePredicate<R>> splitFns) {
    // Make sure map and stream ids are not empty
    require(splitFns.size() > 0, "At least one entry is required");
    require(splitFns.keySet().stream().allMatch(stream -> StringUtils.isNotBlank(stream)),
            "Stream Id can not be blank");

    SplitStreamlet<R> splitStreamlet = new SplitStreamlet<R>(this, splitFns);
    addChild(splitStreamlet);
    return splitStreamlet;
  }
122597
function split(separator, data, limit) {
	var data = ""+data,
	    results = data.split(separator);
	if(!limit) return results;
	if(results.length <= limit) return results;
	var separators = data.match(new RegExp(separator.source, "g"));
	results[limit-1] = join(results.slice(limit-1), separators.slice(limit-1));
	results.length = limit;
	return results;
}
53404
public Stream<JacksonHandle> split(Reader input) throws Exception  { 

        if(input == null) {
            throw new IllegalArgumentException("Input cannot be null.");
        }
        return configureInput(configureObjReader().readValues(input));
    }
452050
def split(string, separator_regexp=None, maxsplit=0):
    
    if not string:
        return []
    if separator_regexp is None:
        separator_regexp = _default_separator()
    if not separator_regexp:
        return string.split()
    return re.split(separator_regexp, string, maxsplit)
42513
public static String[] splitByComma(String input, boolean allowEmpty) {
        if (input == null) {
            return null;
        }
        String[] splitWithEmptyValues = trim(input).split("\\s*,\\s*", -1);
        return allowEmpty ? splitWithEmptyValues : subtraction(splitWithEmptyValues, new String[]{""});
    }
1023144
function split(separator, limit) {
        var O = requireObjectCoercible(this);
        var splitter = separator == undefined ? undefined : separator[SPLIT];
        return splitter !== undefined
          ? splitter.call(separator, O, limit)
          : internalSplit.call(String(O), separator, limit);
      }
865644
public static String[] split(String str, String separator){
    
    	return Pattern.compile(separator).split(str, -1);
    }
900248
public List<List<Token>> process(final String text) {
        final List<List<Token>> paragraph = new ArrayList<>();
        currentSentence = new ArrayList<>();
        final Tokens tokens = splitText(text);

        while (tokens.hasNext()) {
            final Token t = tokens.next();
            final String trimmedWord = t.text.trim();

            // skip spaces
            if (trimmedWord.isEmpty()) continue;

            if (((mode == WITH_PUNCTUATION) || (mode == WITHOUT_PUNCTUATION && isLetterOrDigit(initChar(t.text))))) {
                boolean canBreakSentence = true;
                if (t.text.contains("'")) {
                    wordContainsApostrophe(t);
                }
                else if (".".equals(trimmedWord)) {
                    canBreakSentence = wordIsFullStop(t);
                }
                else if (":".equals(trimmedWord)) {
                    wordIsColon(tokens, t);
                }
                else currentSentence.add(t);

                // handling the end of a sentence
                if (canBreakSentence && equalss(trimmedWord, ".", ";", "?", "!")) {
                    paragraph.add(currentSentence);
                    currentSentence = new ArrayList<>();
                }
            }
        }

        if (!currentSentence.isEmpty()) paragraph.add(currentSentence);
        return paragraph;
    }
322474
public static final String delimited(String text, String delim)
    {
        return stream(text).collect(Collectors.joining(delim));
    }