arrayCopy function

void arrayCopy(
  1. dynamic sourceArray,
  2. dynamic sourceIndex,
  3. dynamic destinationArray,
  4. dynamic destinationIndex,
  5. dynamic length,
)

Implementation

void arrayCopy(
    sourceArray, sourceIndex, destinationArray, destinationIndex, length) {
  var destination = destinationIndex;
  final finalLength = sourceIndex + length;
  for (var i = sourceIndex; i < finalLength; i++) {
    destinationArray[destination] = sourceArray[i];
    ++destination;
  }
}