Joins whitespace-trimmed lines of input, separated by space. @param input a string @return a string with the lines unwrapped.
(final String input)
| 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. |
no test coverage detected