element At Or Null
Returns a character at the given index or null
if the index is out of bounds of this char sequence.
Samples
import samples.*
import kotlin.test.*
fun main() {
//sampleStart
val list = listOf(1, 2, 3)
assertPrints(list.elementAtOrNull(0), "1")
assertPrints(list.elementAtOrNull(2), "3")
assertPrints(list.elementAtOrNull(3), "null")
val emptyList = emptyList<Int>()
assertPrints(emptyList.elementAtOrNull(0), "null")
//sampleEnd
}