getOrNull

Returns a character at the given index or null if the index is out of bounds of this char sequence.

Since Kotlin

1.0

Samples