]> source.dussan.org Git - gitblit.git/commitdiff
Add flatten string array to StringUtils
authorJames Moger <james.moger@gitblit.com>
Fri, 28 Feb 2014 22:55:22 +0000 (17:55 -0500)
committerJames Moger <james.moger@gitblit.com>
Sat, 1 Mar 2014 14:21:32 +0000 (09:21 -0500)
src/main/java/com/gitblit/utils/StringUtils.java

index 8a2af070bd6c266144c8f0a9b42e2f83444a8902..5813c3aeb21ef7a9571f6f320193d3d33e38eb43 100644 (file)
@@ -137,6 +137,18 @@ public class StringUtils {
                return retStr.toString();\r
        }\r
 \r
+       /**\r
+        * Flatten the list of strings into a single string with the specified\r
+        * separator.\r
+        *\r
+        * @param values\r
+        * @param separator\r
+        * @return flattened list\r
+        */\r
+       public static String flattenStrings(String[]  values, String separator) {\r
+               return flattenStrings(Arrays.asList(values), separator);\r
+       }\r
+\r
        /**\r
         * Flatten the list of strings into a single string with a space separator.\r
         *\r