Skip to content

Instantly share code, notes, and snippets.

@jbrains
Created November 21, 2018 09:56
Show Gist options
  • Select an option

  • Save jbrains/ecb542b02e31b02850b8273f26e13319 to your computer and use it in GitHub Desktop.

Select an option

Save jbrains/ecb542b02e31b02850b8273f26e13319 to your computer and use it in GitHub Desktop.

Revisions

  1. jbrains created this gist Nov 21, 2018.
    5 changes: 5 additions & 0 deletions StringBuilderWithFolding.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    private String linesOf(List<String> lines) {
    StringBuilder stringBuilder = new StringBuilder();
    lines.map(line -> stringBuilder.append(line).append(System.lineSeparator()));
    return stringBuilder.toString();
    }