insert

fun insert(list: List, data: <Error class: unknown class>? = null, position: <Error class: unknown class>): List

Inserts a new element into the list at the given position.

Return

the (possibly changed) start of the #GList

Parameters

list

a pointer to a #GList, this must point to the top of the list

data

the data for the new element

position

the position to insert the element. If this is negative, or is larger than the number of elements in the list, the new element is added on to the end of the list.