forked from IF-LK-2020/array
concat
This commit is contained in:
@@ -240,8 +240,15 @@ public class Arrays {
|
||||
* Für ein leeres Array wird ein leerer String zurück gegeben.
|
||||
*/
|
||||
public String concat( String[] pArray ) {
|
||||
if (pArray == null || pArray.length == 0) {
|
||||
return "";
|
||||
}
|
||||
String str = "";
|
||||
for (String s : pArray) {
|
||||
str += s;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
/**
|
||||
* Erzeugt aus einem String-Array einen neuen String,
|
||||
|
||||
Reference in New Issue
Block a user