blob: 97346957a914f1600c5c5c35be6b2ab2bd8138e4 [file] [log] [blame]
Roman Elizarov1f74a2d2018-06-29 19:19:45 +03001/*
2 * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3 */
4
Vsevolod Tolstopyatov96191342018-04-20 18:13:33 +03005package kotlinx.coroutines.experimental.internal
6
Roman Elizarov11d6b5b2018-04-26 10:11:50 +03007internal actual fun <E> arraycopy(source: Array<E>, srcPos: Int, destination: Array<E?>, destinationStart: Int, length: Int) {
Vsevolod Tolstopyatov96191342018-04-20 18:13:33 +03008 var destinationIndex = destinationStart
9 for (sourceIndex in srcPos until srcPos + length) {
10 destination[destinationIndex++] = source[sourceIndex]
11 }
12}