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

Method splitLines

ij/src/main/java/ij/util/Tools.java:278–293  ·  view source on GitHub ↗
(String str)

Source from the content-addressed store, hash-verified

276 }
277
278 static String[] splitLines(String str) {
279 Vector v = new Vector();
280 try {
281 BufferedReader br = new BufferedReader(new StringReader(str));
282 String line;
283 while (true) {
284 line = br.readLine();
285 if (line == null) break;
286 v.addElement(line);
287 }
288 br.close();
289 } catch(Exception e) { }
290 String[] lines = new String[v.size()];
291 v.copyInto((String[])lines);
292 return lines;
293 }
294
295 /** Returns a sorted list of indices of the specified double array.
296 Modified from: http://stackoverflow.com/questions/951848 by N.Vischer.

Callers 1

splitMethod · 0.95

Calls 5

closeMethod · 0.65
readLineMethod · 0.45
addElementMethod · 0.45
sizeMethod · 0.45
copyIntoMethod · 0.45

Tested by

no test coverage detected