splice

open fun <E> splice(list: List<E>, start: Int): List<E>

Removes all elements after the specified start index

Return

The removed elements


open fun <E> splice(list: List<E>, start: Int, deleteCount: Int, items: Array<E>): List<E>

Removes the specified amount of elements after the specified start index and inserts the specified items

Return

The removed elements

Parameters

list

The list of splice

start

The start index

deleteCount

The amount of items to remove

items

The items to insert