reverse

Common
JVM
JS
Native
1.0
fun < T > Array < T > . reverse ( )
(source)
fun ByteArray . reverse ( )
(source)
fun ShortArray . reverse ( )
(source)
fun IntArray . reverse ( )
(source)
fun LongArray . reverse ( )
(source)
fun FloatArray . reverse ( )
(source)
fun DoubleArray . reverse ( )
(source)
fun CharArray . reverse ( )
(source)
@ExperimentalUnsignedTypes fun UIntArray . reverse ( )
(source)
@ExperimentalUnsignedTypes fun ULongArray . reverse ( )
(source)
@ExperimentalUnsignedTypes fun UByteArray . reverse ( )
(source)
@ExperimentalUnsignedTypes fun UShortArray . reverse ( )
(source)

Reverses elements in the array in-place.

Common
JVM
JS
Native
1.4
fun < T > Array < T > . reverse ( fromIndex : Int , toIndex : Int )
(source)
fun ByteArray . reverse ( fromIndex : Int , toIndex : Int )
(source)
fun ShortArray . reverse ( fromIndex : Int , toIndex : Int )
(source)
fun IntArray . reverse ( fromIndex : Int , toIndex : Int )
(source)
fun LongArray . reverse ( fromIndex : Int , toIndex : Int )
(source)
fun FloatArray . reverse ( fromIndex : Int , toIndex : Int )
(source)
fun DoubleArray . reverse ( fromIndex : Int , toIndex : Int )
(source)
fun BooleanArray . reverse ( fromIndex : Int , toIndex : Int )
(source)
fun CharArray . reverse ( fromIndex : Int , toIndex : Int )
(source)
@ExperimentalUnsignedTypes fun UIntArray . reverse (
fromIndex : Int ,
toIndex : Int )

(source)
@ExperimentalUnsignedTypes fun ULongArray . reverse (
fromIndex : Int ,
toIndex : Int )

(source)
@ExperimentalUnsignedTypes fun UByteArray . reverse (
fromIndex : Int ,
toIndex : Int )

(source)
@ExperimentalUnsignedTypes fun UShortArray . reverse (
fromIndex : Int ,
toIndex : Int )

(source)

Reverses elements of the array in the specified range in-place.

Parameters

fromIndex - the start of the range (inclusive) to reverse.

toIndex - the end of the range (exclusive) to reverse.

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 .

Common
JVM
JS
Native
1.0

Reverses elements in the list in-place.