@Test(dataProvider="joinTests") public void testJoin(String[] parts, String separator, String result) { assertEquals(StringUtils.join(Arrays.asList(parts), separator), result); }
public static String join(List<String> words, String separator) { StringBuilder s = new StringBuilder(); for (String w : words) { if (s.length() > 0) { s.append(separator); } s.append(w); } return s.toString(); }
StringUtils { public static String join(List<String> words, String separator) { StringBuilder s = new StringBuilder(); for (String w : words) { if (s.length() > 0) { s.append(separator); } s.append(w); } return s.toString(); } }
StringUtils { public static String join(List<String> words, String separator) { StringBuilder s = new StringBuilder(); for (String w : words) { if (s.length() > 0) { s.append(separator); } s.append(w); } return s.toString(); }  }
StringUtils { public static String join(List<String> words, String separator) { StringBuilder s = new StringBuilder(); for (String w : words) { if (s.length() > 0) { s.append(separator); } s.append(w); } return s.toString(); }  static List<String> split(String s, Pattern delimiterPattern); static String join(List<String> words, String separator); static String join(String[] words, String separator); }
StringUtils { public static String join(List<String> words, String separator) { StringBuilder s = new StringBuilder(); for (String w : words) { if (s.length() > 0) { s.append(separator); } s.append(w); } return s.toString(); }  static List<String> split(String s, Pattern delimiterPattern); static String join(List<String> words, String separator); static String join(String[] words, String separator);  }