Splits the specified {@link String} with the specified delimiter..
554271
public AsciiString[] split(char delim) {
        final List<AsciiString> res = InternalThreadLocalMap.get().arrayList();

        int start = 0;
        final int length = length();
        for (int i = start; i < length; i++) {
            if (charAt(i) == delim) {
                if (start == i) {
                    res.add(EMPTY_STRING);
                } else {
                    res.add(new AsciiString(value, start + arrayOffset(), i - start, false));
                }
                start = i + 1;
            }
        }

        if (start == 0) { // If no delimiter was found in the value
            res.add(this);
        } else {
            if (start != length) {
                // Add the last element if it's not empty.
                res.add(new AsciiString(value, start + arrayOffset(), length - start, false));
            } else {
                // Truncate trailing empty elements.
                for (int i = res.size() - 1; i >= 0; i--) {
                    if (res.get(i).isEmpty()) {
                        res.remove(i);
                    } else {
                        break;
                    }
                }
            }
        }

        return res.toArray(new AsciiString[0]);
    }
78426
public static List<String> split(final CharSequence str, final int size) {
        if (size < 1) {
            throw new IllegalArgumentException("The parameter 'size' can not be zero or less than zero");
        }

        if (N.isNullOrEmpty(str)) {
            return new ArrayList<>();
        }

        return split(str, 0, str.length(), size);
    }
813024
public static List<String> split(String string, String separator)
  {
    final int separatorLength = separator.length();
    final List<String> list = new ArrayList<String>();

    int fromIndex = 0;
    for(;;) {
      int endIndex = string.indexOf(separator, fromIndex);
      if(endIndex == -1) {
        break;
      }
      if(fromIndex < endIndex) {
        list.add(string.substring(fromIndex, endIndex).trim());
      }
      fromIndex = endIndex + separatorLength;
    }
    if(fromIndex < string.length()) {
      list.add(string.substring(fromIndex).trim());
    }
    return list;
  }
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)
1276876
def tsplit(string, delimiters):
    """"""
    delimiters = tuple(delimiters)
    if len(delimiters) < 1:
        return [string,]
    final_delimiter = delimiters[0]
    for i in delimiters[1:]:
        string = string.replace(i, final_delimiter)
    return string.split(final_delimiter)
874473
private static String[] split(String value, String delimeter) {
        StringTokenizer st = new StringTokenizer(value, delimeter);
        String[] res = new String[st.countTokens()];
        for (int i = 0; st.hasMoreTokens(); i++) {
            res[i] = st.nextToken();
        }
        return res;
    }
1109216
public static String[] split(String src, String separator) {
        if (isEmpty(separator)) {
            return new String[] { src };
        }
        if (isEmpty(src)) {
            return StringUtils.EMPTY_STRING_ARRAY;
        }
        return src.split(separator, -1);
    }
762273
def split(string, callback=None, sep=None):
    
    if callback is not None:
        return [callback(i) for i in string.split(sep)]
    else:
        return string.split(sep)
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()]);
    }
152748
public static String[] splitLongString(String str, char separator)
    {
        int len = (str == null) ? 0 : str.length();
        if (str == null || len == 0)
        {
            return ArrayUtils.EMPTY_STRING_ARRAY;
        }

        int       oldPos = 0;
        ArrayList list = new ArrayList();
        int pos = str.indexOf(separator);
        while(pos >= 0)
        {
            list.add(substring(str, oldPos, pos));
            oldPos = (pos + 1);
            pos = str.indexOf(separator, oldPos);
        }


        list.add(substring(str, oldPos, len));

        return (String[]) list.toArray(ArrayUtils.EMPTY_STRING_ARRAY);
    }
867301
public static List<String> splitString(String line, int begin, int end, char delim) {
		return splitString(line, begin, end, delim, new ArrayList<String>());
	}
559570
private static List<String> split(String str, char delim) {

    List<String> result = Lists.newArrayList();

    int currPartStart = 0;
    while (true) {
      int currPartEnd = str.indexOf(delim, currPartStart);
      if (currPartEnd == -1) {
        result.add(str.substring(currPartStart));
        break;
      } else {
        result.add(str.substring(currPartStart, currPartEnd));
        currPartStart = currPartEnd + 1;
      }
    }

    return result;
  }
383898
private List<byte[]> splitBytes(byte[] array, byte delimiter) {
		List<byte[]> byteArrays = new ArrayList<byte[]>();
		int begin = 0;

		for (int i = 0; i < array.length; i++) {
			// first find delimiter.
			while (i < array.length && array[i] != delimiter) {
				i++;
			}
			byteArrays.add(Arrays.copyOfRange(array, begin, i));
			begin = i + 1;
		}
		return byteArrays;
	}
632068
static final List<String> split(String value) {
        List<String> result = new ArrayList<String>();

        SplitState state = SplitState.NEW;
        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < value.length(); i++) {
            char c = value.charAt(i);

            stateSwitch:
            switch (state) {

                // Seeking the first character of a new word
                case NEW:
                case NEW_WITH_AT_LEAST_ONE_WORD: {
                    newSwitch:
                    switch (c) {

                        // Empty word
                        case ',':
                        case ';': {
                            state = SplitState.NEW_WITH_AT_LEAST_ONE_WORD;
                            result.add("");
                            break newSwitch;
                        }

                        // Ignorable whitespace
                        case ' ':
                        case '\t':
                        case '\n':
                        case '\r': {
                            break newSwitch;
                        }

                        // Start of a delimited word
                        case '"': {
                            state = SplitState.DELIMITED;
                            break newSwitch;
                        }

                        // Start of a non-delimited word
                        default: {
                            state = SplitState.NON_DELIMITED;
                            sb.append(c);
                            break newSwitch;
                        }
                    }

                    break stateSwitch;
                }

                // Within a delimited word
                case DELIMITED: {
                    delimitedSwitch:
                    switch (c) {

                        // Potential ending delimiter
                        case '"': {

                            // Escaped delimiter, consume subsequent quote char
                            if (i + 1 < value.length() && value.charAt(i + 1) == '"') {
                                sb.append(c);
                                i++;
                            }

                            // Delimiter not followed by whitespace or word stop
                            else if (i + 1 < value.length() && !asList(',', ';', ' ', '\t', '\n', '\r').contains(value.charAt(i + 1))) {
                                sb.append(c);
                            }

                            // Consume word stop following delimiter
                            else if (i + 1 < value.length() && asList(',', ';').contains(value.charAt(i + 1))) {
                                result.add(sb.toString());
                                sb = new StringBuilder();
                                state = SplitState.NEW_WITH_AT_LEAST_ONE_WORD;
                                i++;
                            }

                            // Ending delimiter. Either it's the last character
                            // or it is followed by whitespace
                            else {
                                result.add(sb.toString());
                                sb = new StringBuilder();
                                state = SplitState.NEW;
                            }

                            break delimitedSwitch;
                        }

                        // Any word content
                        default: {
                            sb.append(c);
                            break delimitedSwitch;
                        }
                    }

                    break stateSwitch;
                }

                case NON_DELIMITED: {
                    nonDelimitedSwitch:
                    switch (c) {

                        // Hard word stop
                        case ',':
                        case ';': {
                            result.add(sb.toString());
                            sb = new StringBuilder();
                            state = SplitState.NEW_WITH_AT_LEAST_ONE_WORD;
                            break nonDelimitedSwitch;
                        }

                        // Soft word stop
                        case ' ':
                        case '\t':
                        case '\n':
                        case '\r': {
                            result.add(sb.toString());
                            sb = new StringBuilder();
                            state = SplitState.NEW;
                            break nonDelimitedSwitch;
                        }

                        // Any word content
                        default: {
                            sb.append(c);
                            break nonDelimitedSwitch;
                        }
                    }

                    break stateSwitch;
                }
            }
        }

        // Cleaning up the last word
        switch (state) {

            // We were beginning a new word, so ignore sb content
            case NEW:
                break;

            // The content of sb is relevant, so add it
            case NEW_WITH_AT_LEAST_ONE_WORD:
            case DELIMITED:
            case NON_DELIMITED:
                result.add(sb.toString());
                break;
        }

        return result;
    }
799901
public static List<String> split(
                    final String str
                    )
    {
        String  s = str;
        if (s != null) {
            s = s.trim();
        }

        List<String>  list = new ArrayList<String>();
        if (s == null || s.length() == 0) {
            return list;
        }

        String[]  tokens = s.split( "[ \t\n\r\f]" );
        // NOTE: tokens[i] may be an empty string "".

        // excludes empty strings.
        int  n_tokens = tokens.length;
        for (int  i = 0; i < n_tokens; i++) {
            if (tokens[i].length() > 0) {
                list.add( tokens[i] );
            }
        }

        return list;
    }
322474
public static final String delimited(String text, String delim)
    {
        return stream(text).collect(Collectors.joining(delim));
    }
245823
public static String joiningWithDelimiter(CharSequence delimiter,
            String... strings) {
        return joiningWith(Arrays.stream(strings), delimiter);
    }