Added concatenate methods in StringsUtils.
This commit is contained in:
parent
3055a98c66
commit
71219fdb70
1 changed files with 34 additions and 0 deletions
|
@ -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<String> 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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue