From 71219fdb700720c06b0aa8a9d974ba4dac078ad1 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Wed, 13 Jun 2018 12:46:35 +0200 Subject: [PATCH] Added concatenate methods in StringsUtils. --- src/fr/devinsy/strings/StringsUtils.java | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/fr/devinsy/strings/StringsUtils.java b/src/fr/devinsy/strings/StringsUtils.java index 0d96c37..fe2ef39 100644 --- a/src/fr/devinsy/strings/StringsUtils.java +++ b/src/fr/devinsy/strings/StringsUtils.java @@ -85,6 +85,40 @@ public class StringsUtils } } + /** + * Concatenates a string list. + * + * @param source + * the source + * @return the concatenate of source strings. + */ + public static String concatenate(final Collection source) + { + String result; + + result = new StringList(source).toString(); + + // + return result; + } + + /** + * Concatenates strings. + * + * @param source + * the source + * @return the concatenate of source strings. + */ + public static String concatenate(final String... source) + { + String result; + + result = new StringList(source).toString(); + + // + return result; + } + /** * Builds a string concatenating many times a source string. *