package stexfires.util;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * This class consists of {@code static} utility methods for operating on strings and string streams.
 *
 * @author Mathias Kalb
 * @since 0.1
 */
public final class Strings {

    public static final String DEFAULT_DELIMITER = ", ";
    public static final String EMPTY = "";

    private Strings() {
    }

    public static String asString(Object o) {
        return o == null ? null : o.toString();
    }

    @SuppressWarnings("SameReturnValue")
    public static String empty() {
        return EMPTY;
    }

    public static List<String> list(String string) {
        return Collections.singletonList(string);
    }

    public static List<String> list(String... strings) {
        return Arrays.stream(strings).collect(Collectors.toList());
    }

    public static Stream<String> stream(String string) {
        return Stream.of(string);
    }

    public static Stream<String> stream(String... strings) {
        return Stream.of(strings);
    }

    public static Stream<String> streamOfNullable(String string) {
        return string == null ? Stream.empty() : Stream.of(string);
    }

    public static List<String> collect(Stream<String> stream) {
        return stream.collect(Collectors.toList());
    }

    public static String join(Stream<String> stream) {
        return join(stream, DEFAULT_DELIMITER);
    }

    public static String join(Stream<String> stream, CharSequence delimiter) {
        return stream.collect(Collectors.joining(delimiter));
    }

    public static void printLine(Stream<String> stream, CharSequence delimiter) {
        System.out.println(join(stream, delimiter));
    }

    public static void printLines(Stream<String> stream) {
        stream.forEachOrdered(System.out::println);
    }

}

@@ -96,16 +96,52 @@
 l.List;%0A
+import java.util.function.Function;%0A
 import j
@@ -168,16 +168,16 @@
 ectors;%0A
-
 import j
@@ -439,26 +439,28 @@
 = %22, %22;%0A
+%0A
     p
-ublic
+rivate
  static 
@@ -621,49 +621,8 @@
  %7D%0A%0A
-    @SuppressWarnings(%22SameReturnValue%22)%0A
     
@@ -1183,32 +1183,32 @@
 tring string) %7B%0A
-
         return s
@@ -1258,32 +1258,352 @@
 string);%0A    %7D%0A%0A
+    public static Stream%3CString%3E concat(Stream%3CString%3E firstStream, Stream%3CString%3E secondStream) %7B%0A        return Stream.concat(firstStream, secondStream);%0A    %7D%0A%0A    @SafeVarargs%0A    public static Stream%3CString%3E concat(Stream%3CString%3E... streams) %7B%0A        return Stream.of(streams).flatMap(Function.identity());%0A    %7D%0A%0A
     public stati

Add concat methods