Merges the contents of another StringJoiner into this one. The other joiner's elements are added without its prefix and suffix, using its delimiter to join them as a single element.
Example:
var j1 = new StringJoiner (", ", "[", "]");
j1.add ("a");
var j2 = new StringJoiner ("-");
j2.add ("b");
j2.add ("c");
j1.merge (j2);
assert (j1.toString () == "[a, b-c]");
| other |
the StringJoiner to merge from. |
|
this StringJoiner for chaining. |