added appendArray function

This commit is contained in:
Shekhar Gulati
2016-05-03 19:18:09 +05:30
parent 425f02bdc4
commit c07e3e2fb3
+8 -2
View File
@@ -12,13 +12,19 @@ public interface Strman {
* Appends Strings to value
*
* @param value initial String
* @param appends -- an array of strings to append
* @return full string
* @param appends an array of strings to append
* @return full String
*/
static String append(final String value, final String... appends) throws IllegalArgumentException {
return appendArray(value, appends);
}
/**
* Append an array of String to value
* @param value initial String
* @param appends an array of strings to append
* @return full String
*/
static String appendArray(String value, String[] appends) {
if (value == null) {
throw new IllegalArgumentException("'value' should be not null.");