copyOfRange
fun
<
T
>
Array
<
T
>
.
copyOfRange
(
fromIndex
:
Int
,
toIndex
:
Int
)
:
Array
<
T
>
(Common source) (Native source)
@JvmName
(
"copyOfRangeInline"
)
fun
<
T
>
Array
<
T
>
.
copyOfRange
(
fromIndex
:
Int
,
toIndex
:
Int
)
:
Array
<
T
>
(source)
fun
ByteArray
.
copyOfRange
(
fromIndex
:
Int
,
toIndex
:
Int
)
:
ByteArray
(Common source) (JS source) (Native source)
fun
ShortArray
.
copyOfRange
(
fromIndex
:
Int
,
toIndex
:
Int
)
:
ShortArray
(Common source) (JS source) (Native source)
@JvmName
(
"copyOfRangeInline"
)
fun
ShortArray
.
copyOfRange
(
fromIndex
:
Int
,
toIndex
:
Int
)
:
ShortArray
(source)
fun
IntArray
.
copyOfRange
(
fromIndex
:
Int
,
toIndex
:
Int
)
:
IntArray
(Common source) (JS source) (Native source)
fun
LongArray
.
copyOfRange
(
fromIndex
:
Int
,
toIndex
:
Int
)
:
LongArray
(Common source) (JS source) (Native source)
fun
FloatArray
.
copyOfRange
(
fromIndex
:
Int
,
toIndex
:
Int
)
:
FloatArray
(Common source) (JS source) (Native source)
@JvmName
(
"copyOfRangeInline"
)
fun
FloatArray
.
copyOfRange
(
fromIndex
:
Int
,
toIndex
:
Int
)
:
FloatArray
(source)
fun
DoubleArray
.
copyOfRange
(
fromIndex
:
Int
,
toIndex
:
Int
)
:
DoubleArray
(Common source) (JS source) (Native source)
@JvmName
(
"copyOfRangeInline"
)
fun
DoubleArray
.
copyOfRange
(
fromIndex
:
Int
,
toIndex
:
Int
)
:
DoubleArray
(source)
fun
BooleanArray
.
copyOfRange
(
fromIndex
:
Int
,
toIndex
:
Int
)
:
BooleanArray
(Common source) (JS source) (Native source)
@JvmName
(
"copyOfRangeInline"
)
fun
BooleanArray
.
copyOfRange
(
fromIndex
:
Int
,
toIndex
:
Int
)
:
BooleanArray
(source)
fun
CharArray
.
copyOfRange
(
fromIndex
:
Int
,
toIndex
:
Int
)
:
CharArray
(Common source) (JS source) (Native source)
Returns a new array which is a copy of the specified range of the original array.
Parameters
fromIndex
- the start of the range (inclusive) to copy.
toIndex
- the end of the range (exclusive) to copy.
Exceptions
IndexOutOfBoundsException
- if
fromIndex
is less than zero or
toIndex
is greater than the size of this array.
IllegalArgumentException
- if
fromIndex
is greater than
toIndex
.
@ExperimentalUnsignedTypes
fun
ULongArray
.
copyOfRange
(
fromIndex
:
Int
,
toIndex
:
Int
)
:
ULongArray
(source)
@ExperimentalUnsignedTypes
fun
UByteArray
.
copyOfRange
(
fromIndex
:
Int
,
toIndex
:
Int
)
:
UByteArray
(source)
@ExperimentalUnsignedTypes
fun
UShortArray
.
copyOfRange
(
fromIndex
:
Int
,
toIndex
:
Int
)
:
UShortArray
(source)
Returns a new array which is a copy of the specified range of the original array.
Parameters
fromIndex
- the start of the range (inclusive) to copy.
toIndex
- the end of the range (exclusive) to copy.
Exceptions
IndexOutOfBoundsException
- if
fromIndex
is less than zero or
toIndex
is greater than the size of this array.
IllegalArgumentException
- if
fromIndex
is greater than
toIndex
.