lastIndex

Common
JVM
JS
Native
1.0
val CharSequence.lastIndex: Int

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