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

Method unwrap

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

Joins whitespace-trimmed lines of input, separated by space. @param input a string @return a string with the lines unwrapped.

(final String input)

Source from the content-addressed store, hash-verified

650 * @return a string with the lines unwrapped.
651 */
652 public static String unwrap(final String input) {
653 final String[] lines = splitLines(input);
654 final StringBuilder sb = new StringBuilder();
655 for (int i = 0; i < lines.length; ++i) {
656 if (i > 0) {
657 sb.append(" ");
658 }
659 sb.append(lines[i].trim());
660 }
661 return sb.toString();
662 }
663
664 /**
665 * Compares the lines in two strings for equivalence, ignoring line endings and whitespace.

Callers 1

containsAllMethod · 0.95

Calls 4

splitLinesMethod · 0.95
appendMethod · 0.65
trimMethod · 0.65
toStringMethod · 0.65

Tested by

no test coverage detected