W3cubDocs

/Kotlin

fill

fun <T> Array<T>.fill(
    element: T, 
    fromIndex: Int = 0, 
    toIndex: Int = size)

Platform and version requirements: JVM

fun ByteArray.fill(
    element: Byte, 
    fromIndex: Int = 0, 
    toIndex: Int = size)

Platform and version requirements: JVM

fun ShortArray.fill(
    element: Short, 
    fromIndex: Int = 0, 
    toIndex: Int = size)

Platform and version requirements: JVM

fun IntArray.fill(
    element: Int, 
    fromIndex: Int = 0, 
    toIndex: Int = size)

Platform and version requirements: JVM

fun LongArray.fill(
    element: Long, 
    fromIndex: Int = 0, 
    toIndex: Int = size)

Platform and version requirements: JVM

fun FloatArray.fill(
    element: Float, 
    fromIndex: Int = 0, 
    toIndex: Int = size)

Platform and version requirements: JVM

fun DoubleArray.fill(
    element: Double, 
    fromIndex: Int = 0, 
    toIndex: Int = size)

Platform and version requirements: JVM

fun BooleanArray.fill(
    element: Boolean, 
    fromIndex: Int = 0, 
    toIndex: Int = size)

Platform and version requirements: JVM

fun CharArray.fill(
    element: Char, 
    fromIndex: Int = 0, 
    toIndex: Int = size)

Platform and version requirements: JVM

Fills original array with the provided value.

© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/fill.html