MCPcopy Index your code
hub / github.com/MCBans/MCBans / join

Method join

src/main/java/com/mcbans/plugin/org/json/JSONArray.java:352–363  ·  view source on GitHub ↗

Make a string from the contents of this JSONArray. The separator string is inserted between each element. Warning: This method assumes that the data structure is acyclical. @param separator A string that will be inserted between the elements. @return a string. @throws JSONException If t

(String separator)

Source from the content-addressed store, hash-verified

350 * @throws JSONException If the array contains an invalid number.
351 */
352 public String join(String separator) throws JSONException {
353 int len = length();
354 StringBuffer sb = new StringBuffer();
355
356 for (int i = 0; i < len; i += 1) {
357 if (i > 0) {
358 sb.append(separator);
359 }
360 sb.append(JSONObject.valueToString(this.myArrayList.get(i)));
361 }
362 return sb.toString();
363 }
364
365
366 /**

Callers 1

toStringMethod · 0.95

Calls 5

lengthMethod · 0.95
valueToStringMethod · 0.95
appendMethod · 0.45
getMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected