public static int lastIndexOf(CharSequence seq, CharSequence searchSeq, int startPos) {
        if (seq == null || searchSeq == null) {
            return INDEX_NOT_FOUND;
        }
        return CharSequenceUtils.lastIndexOf(seq, searchSeq, startPos);
    }
<p>Finds the first index within a CharSequence, handling {@code null}.
This method uses {@link String#lastIndexOf(String, int)} if possible.</p>

<p>A {@code null} CharSequence will return {@code -1}.
A negative start position returns {@code -1}.
An empty ("") search CharSequence always matches unless the start position is negative.
A start position greater than the string length searches the whole string.</p>

<pre>
StringUtils.lastIndexOf(null, *, *)          = -1
StringUtils.lastIndexOf(*, null, *)          = -1
StringUtils.lastIndexOf("aabaabaa", "a", 8)  = 7
StringUtils.lastIndexOf("aabaabaa", "b", 8)  = 5
StringUtils.lastIndexOf("aabaabaa", "ab", 8) = 4
StringUtils.lastIndexOf("aabaabaa", "b", 9)  = 5
StringUtils.lastIndexOf("aabaabaa", "b", -1) = -1
StringUtils.lastIndexOf("aabaabaa", "a", 0)  = 0
StringUtils.lastIndexOf("aabaabaa", "b", 0)  = -1
</pre>

@param seq  the CharSequence to check, may be null
@param searchSeq  the CharSequence to find, may be null
@param startPos  the start position, negative treated as zero
@return the first index of the search CharSequence,
 -1 if no match or {@code null} string input
@since 2.0
@since 3.0 Changed signature from lastIndexOf(String, String, int) to lastIndexOf(CharSequence, CharSequence, int)
android/android_framework/base/src/main/java/lang3/StringUtils.java