lastIndex

Returns the index of the last character in the char sequence or -1 if it is empty.

Since Kotlin

1.0