prefix() finished

This commit is contained in:
artem.didytschuk 2020-08-31 23:04:01 +02:00
parent acb7f0c475
commit 15d53c68cf
1 changed files with 9 additions and 1 deletions

View File

@ -289,7 +289,15 @@ public class Arrays {
* zum Beispiel <code>["+String 1","+String 2"]</code>.
*/
public String[] prefix( String[] pArray, String pPrefix ) {
return null;
if( pArray.length == 0 ) {
return new String[0];
}
for(int i=0;i<pArray.length;i++){
pArray[i]=pPrefix+pArray[i];
}
return pArray;
}
/**