getOrNull

open infix fun getOrNull(index: PositiveInt): E?

Returns the element at the specified index in this collection, or returns null if the index is out of bounds.


open infix fun getOrNull(index: Int): E?

Deprecated

The index should be a PositiveInt or a StrictlyPositiveInt.

Replace with

import kotools.types.number.PositiveInt
getOrNull(PositiveInt(index))

Returns the element at the specified index in this collection, or returns null if the index is out of bounds.