MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / joinArray

Method joinArray

ij/src/main/java/ij/macro/Functions.java:5188–5205  ·  view source on GitHub ↗
(Variable[] a, String delimiter)

Source from the content-addressed store, hash-verified

5186 }
5187
5188 private StringBuilder joinArray(Variable[] a, String delimiter) {
5189 int len = a.length;
5190 StringBuilder sb = new StringBuilder(len*6);
5191 for (int i=0; i<len; i++) {
5192 String s = a[i].getString();
5193 if (s==null) {
5194 double v = a[i].getValue();
5195 if ((int)v==v)
5196 s = IJ.d2s(v,0);
5197 else
5198 s = ResultsTable.d2s(v,4);
5199 }
5200 sb.append(s);
5201 if (i!=len-1)
5202 sb.append(delimiter);
5203 }
5204 return sb;
5205 }
5206
5207 private String showString() {
5208 showText();

Callers 2

joinMethod · 0.95
printArrayMethod · 0.95

Calls 5

d2sMethod · 0.95
d2sMethod · 0.95
appendMethod · 0.65
getStringMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected