MCPcopy Create free account
hub / github.com/RealTimeGenomics/rtg-tools / sortLines

Method sortLines

src/test/java/com/rtg/util/TestUtils.java:623–632  ·  view source on GitHub ↗

Take a string of LS separated strings and sort them and return them as a concatenated (LS separated) string. @param in string of lines to be sorted. @return sorted result.

(final String in)

Source from the content-addressed store, hash-verified

621 * @return sorted result.
622 */
623 public static String sortLines(final String in) {
624 final String[] split = splitLines(in);
625 Arrays.sort(split);
626 //System.err.println(Arrays.toString(split));
627 final StringBuilder sb = new StringBuilder();
628 for (final String s : split) {
629 sb.append(s).append(StringUtils.LS);
630 }
631 return sb.toString();
632 }
633
634 /**
635 * Concatenates lines in input

Callers

nothing calls this directly

Calls 4

splitLinesMethod · 0.95
appendMethod · 0.65
toStringMethod · 0.65
sortMethod · 0.45

Tested by

no test coverage detected