hwsecurity / de.cotech.hw.util / Arrays / copyOfRange /

copyOfRange

open fun copyOfRange(data: Array< Byte>, from: Int, to: Int): Array< Byte>

Make a copy of a range of bytes from the passed in data array. The range canextend beyond the end of the input array, in which case the return array willbe padded with zeroes.

Return

a new byte array containing the range given.

Parameters

Name Summary
data the array from which the data is to be copied.
from the start index at which the copying should take place.
to the final index of the range (exclusive).

open fun copyOfRange(data: Array< Int>, from: Int, to: Int): Array< Int>
open fun copyOfRange(data: Array< Long>, from: Int, to: Int): Array< Long>
open fun copyOfRange(data: Array< BigInteger>, from: Int, to: Int): Array< BigInteger>