fill

fun fill(value: T, start: Int = definedExternally, end: Int = definedExternally): S(source)

Changes all array elements from start to end index to a static value and returns the modified array

Parameters

value

value to fill array section with

start

index to start filling the array at. If start is negative, it is treated as length+start where length is the length of the array.

end

index to stop filling the array at. If end is negative, it is treated as length+end.