Fills this array or its subrange with the specified element value.
fromIndex
- the start of the range (inclusive) to fill, 0 by default.
toIndex
- the end of the range (exclusive) to fill, size of this array by default.
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 UIntArray.fill( element: UInt, fromIndex: Int = 0, toIndex: Int = size)
@ExperimentalUnsignedTypes fun ULongArray.fill( element: ULong, fromIndex: Int = 0, toIndex: Int = size)
@ExperimentalUnsignedTypes fun UByteArray.fill( element: UByte, fromIndex: Int = 0, toIndex: Int = size)
@ExperimentalUnsignedTypes fun UShortArray.fill( element: UShort, fromIndex: Int = 0, toIndex: Int = size)
Fills this array or its subrange with the specified element value.
fromIndex
- the start of the range (inclusive) to fill, 0 by default.
toIndex
- the end of the range (exclusive) to fill, size of this array by default.
IndexOutOfBoundsException
- if fromIndex is less than zero or toIndex is greater than the size of this array.
IllegalArgumentException
- if fromIndex is greater than toIndex.
© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/fill.html