lastIndexOf

abstract fun lastIndexOf(text: String, sub: String): Int

查找子串最后一次出现的索引。

Return

索引位置,未找到返回 -1

Parameters

text

源字符串

sub

搜索的子串