method replaceValuesInRangeWithValuesFromArrayRange

void replaceValuesInRangeWithValuesFromArrayRange(int32 idx1,int32 idx2,object otherArray,int32 otherIdx1,int32 otherIdx2);

Argumente

Zurückgegebener Wert

This method deletes all elements from the starting index (idx1) to the ending index (idx2) and inserts all elements in otherArray from otherIdx1 to otherIdx2 to current array.
var arrayObj = shell.serviceManager.basics.array;
arrayObj.addValue("a");
arrayObj.addValue("b");
arrayObj.addValue("c");
arrayObj.addValue("a");
arrayObj.addValue("b");
arrayObj.addValue("c");
arrayObj.addValue("a");
arrayObj.addValue("b");
arrayObj.addValue("c");

var arrayObj2 = shell.serviceManager.basics.array;
arrayObj2.addValue("d");
arrayObj2.addValue("e");
arrayObj2.addValue("f");
arrayObj2.addValue("g");
arrayObj2.addValue("h");
arrayObj2.addValue("i");

//Element from 3 to 6 will be remove from the current array
//subarray of arrayObj2 from index 2 to 5 will
//be inserted into arrayObj starting at index 3
arrayObj.replaceValuesInRangeWithValuesFromArrayRange(3, 6, arrayObj2, 2, 5);