MCPcopy
hub / github.com/vipshop/vjtools / join

Method join

vjtop/src/main/java/com/vip/vjtools/vjtop/util/Formats.java:213–228  ·  view source on GitHub ↗

Joins the given list of strings using the given delimiter delim

(List<String> list, String delim)

Source from the content-addressed store, hash-verified

211 * Joins the given list of strings using the given delimiter delim
212 */
213 public static String join(List<String> list, String delim) {
214
215 StringBuilder sb = new StringBuilder();
216
217 String loopDelim = "";
218
219 for (String s : list) {
220
221 sb.append(loopDelim);
222 sb.append(s);
223
224 loopDelim = delim;
225 }
226
227 return sb.toString();
228 }
229
230 public static long parseFromSize(String str) {
231 if (str == null || str.isEmpty()) {

Callers 4

initMethod · 0.95
getVmArgumentsMethod · 0.80

Calls 2

appendMethod · 0.45
toStringMethod · 0.45

Tested by 2