lastIndexOf

Common
JS
Native
1.4
fun lastIndexOf ( string : String ) : Int
(Common source) (JS source) (Native 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.

Common
JS
Native
1.4
fun lastIndexOf ( string : String , startIndex : Int ) : Int
(Common source) (JS source) (Native 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 .