lastIndexOf

expect fun lastIndexOf(string: String): Int(source)

Returns the index within this string builder of the last occurrence of the specified string. The last occurrence of empty string "" is considered to be at the index equal to this.length.

Returns -1 if the specified string does not occur in this string builder.

Since Kotlin

1.4

expect fun lastIndexOf(string: String, startIndex: Int): Int(source)

Returns the index within this string builder of the last occurrence of the specified string, starting from the specified startIndex toward the beginning.

Returns -1 if the specified string does not occur in this string builder starting at the specified startIndex.

Since Kotlin

1.4
actual fun lastIndexOf(string: String): Int(source)

Returns the index within this string builder of the last occurrence of the specified string. The last occurrence of empty string "" is considered to be at the index equal to this.length.

Returns -1 if the specified string does not occur in this string builder.

Since Kotlin

1.4

actual fun lastIndexOf(string: String, startIndex: Int): Int(source)

Returns the index within this string builder of the last occurrence of the specified string, starting from the specified startIndex toward the beginning.

Returns -1 if the specified string does not occur in this string builder starting at the specified startIndex.

Since Kotlin

1.4
actual fun lastIndexOf(string: String): Int(source)

Returns the index within this string builder of the last occurrence of the specified string. The last occurrence of empty string "" is considered to be at the index equal to this.length.

Returns -1 if the specified string does not occur in this string builder.

Since Kotlin

1.4

actual fun lastIndexOf(string: String, startIndex: Int): Int(source)

Returns the index within this string builder of the last occurrence of the specified string, starting from the specified startIndex toward the beginning.

Returns -1 if the specified string does not occur in this string builder starting at the specified startIndex.

Since Kotlin

1.4
actual fun lastIndexOf(string: String): Int(source)

Returns the index within this string builder of the last occurrence of the specified string. The last occurrence of empty string "" is considered to be at the index equal to this.length.

Returns -1 if the specified string does not occur in this string builder.

Since Kotlin

1.8

actual fun lastIndexOf(string: String, startIndex: Int): Int(source)

Returns the index within this string builder of the last occurrence of the specified string, starting from the specified startIndex toward the beginning.

Returns -1 if the specified string does not occur in this string builder starting at the specified startIndex.

Since Kotlin

1.8
actual fun lastIndexOf(string: String): Int(source)

Returns the index within this string builder of the last occurrence of the specified string. The last occurrence of empty string "" is considered to be at the index equal to this.length.

Returns -1 if the specified string does not occur in this string builder.

Since Kotlin

1.8

actual fun lastIndexOf(string: String, startIndex: Int): Int(source)

Returns the index within this string builder of the last occurrence of the specified string, starting from the specified startIndex toward the beginning.

Returns -1 if the specified string does not occur in this string builder starting at the specified startIndex.

Since Kotlin

1.8