@Test public void testSplit() { String[] input = Stream.of("", ",abc;;", "ad,", "|\n\n df", "\\c") .map(s -> StringEscaper.escape(s, ESCAPED_CHARACTERS)) .toArray(String[]::new); String delimiter = ","; String[] output = StringEscaper.split(String.join(delimiter, input), delimiter); assertArrayEquals(input, output); delimiter = "c;"; output = StringEscaper.split(String.join(delimiter, input), delimiter); assertArrayEquals(input, output); delimiter = "\n\n.;|"; output = StringEscaper.split(String.join(delimiter, input), delimiter); assertArrayEquals(input, output); }
public static String[] split(String escapedString, String delimiter) throws IllegalArgumentException { return split(escapedString, delimiter, 0); }
StringEscaper { public static String[] split(String escapedString, String delimiter) throws IllegalArgumentException { return split(escapedString, delimiter, 0); } }
StringEscaper { public static String[] split(String escapedString, String delimiter) throws IllegalArgumentException { return split(escapedString, delimiter, 0); }  }
StringEscaper { public static String[] split(String escapedString, String delimiter) throws IllegalArgumentException { return split(escapedString, delimiter, 0); }  static String escape(String string, Set<Character> escapedCharacters); static String unescape(String escapedString); static String[] split(String escapedString, String delimiter); static String[] split(String escapedString, String delimiter, int limit); }
StringEscaper { public static String[] split(String escapedString, String delimiter) throws IllegalArgumentException { return split(escapedString, delimiter, 0); }  static String escape(String string, Set<Character> escapedCharacters); static String unescape(String escapedString); static String[] split(String escapedString, String delimiter); static String[] split(String escapedString, String delimiter, int limit);  }