@Test void testSplit_StringString_StringStringInt() { assertNull(StringUtils.split(null, ".")); assertNull(StringUtils.split(null, ".", 3)); assertEquals(0, StringUtils.split("", ".").length); assertEquals(0, StringUtils.split("", ".", 3).length); innerTestSplit('.', ".", ' '); innerTestSplit('.', ".", ','); innerTestSplit('.', ".,", 'x'); for (int i = 0; i < WHITESPACE.length(); i++) { for (int j = 0; j < NON_WHITESPACE.length(); j++) { innerTestSplit(WHITESPACE.charAt(i), null, NON_WHITESPACE.charAt(j)); innerTestSplit(WHITESPACE.charAt(i), String.valueOf(WHITESPACE.charAt(i)), NON_WHITESPACE.charAt(j)); } } String[] results; final String[] expectedResults = {"ab", "de fg"}; results = StringUtils.split("ab de fg", null, 2); assertEquals(expectedResults.length, results.length); for (int i = 0; i < expectedResults.length; i++) { assertEquals(expectedResults[i], results[i]); } final String[] expectedResults2 = {"ab", "cd:ef"}; results = StringUtils.split("ab:cd:ef", ":", 2); assertEquals(expectedResults2.length, results.length); for (int i = 0; i < expectedResults2.length; i++) { assertEquals(expectedResults2[i], results[i]); } }
public static String[] split(String str) { return split(str, null, -1); }
StringUtils { public static String[] split(String str) { return split(str, null, -1); } }
StringUtils { public static String[] split(String str) { return split(str, null, -1); }  }
StringUtils { public static String[] split(String str) { return split(str, null, -1); }  static String[] split(String str); static String[] split(String str, String separatorChars); static String[] split(String str, char separatorChar); static String[] split(String str, String separatorChars, int max); static String[] splitByWholeSeparator(String str, String separator); static String[] splitByWholeSeparator(String str, String separator, int max); static boolean hasText(String str); static boolean hasText(CharSequence str); static boolean hasLength(CharSequence str); static boolean hasLength(String str); static String replace(String s, Map<String, Object> map); static String replace(String s, Object... objs); static String replaceStr(String s, String sub, String with); static String escapeXML(String str); static String unicodeToString(String s); static String getFilenameExtension(String path); static String getFilename(String path); static byte[] getUtf8Bytes(String string); static byte[] getBytes(String string); static int toInt(String string, int from); static void append(StringBuilder buf, byte b, int base); static void append2digits(StringBuilder buf, int i); static String asciiToLowerCase(String s); static String normalizeCharset(String s); static String normalizeCharset(String s, int offset, int length); static boolean isHex(String str, int offset, int length); static String truncate(String str, int maxSize); }
StringUtils { public static String[] split(String str) { return split(str, null, -1); }  static String[] split(String str); static String[] split(String str, String separatorChars); static String[] split(String str, char separatorChar); static String[] split(String str, String separatorChars, int max); static String[] splitByWholeSeparator(String str, String separator); static String[] splitByWholeSeparator(String str, String separator, int max); static boolean hasText(String str); static boolean hasText(CharSequence str); static boolean hasLength(CharSequence str); static boolean hasLength(String str); static String replace(String s, Map<String, Object> map); static String replace(String s, Object... objs); static String replaceStr(String s, String sub, String with); static String escapeXML(String str); static String unicodeToString(String s); static String getFilenameExtension(String path); static String getFilename(String path); static byte[] getUtf8Bytes(String string); static byte[] getBytes(String string); static int toInt(String string, int from); static void append(StringBuilder buf, byte b, int base); static void append2digits(StringBuilder buf, int i); static String asciiToLowerCase(String s); static String normalizeCharset(String s); static String normalizeCharset(String s, int offset, int length); static boolean isHex(String str, int offset, int length); static String truncate(String str, int maxSize); static final String EMPTY; static final String[] EMPTY_STRING_ARRAY; }