public static int lastIndexOf(CharSequence seq, int searchChar, int startPos) {
        if (isEmpty(seq)) {
            return INDEX_NOT_FOUND;
        }
        return CharSequenceUtils.lastIndexOf(seq, searchChar, startPos);
    }
<p>Finds the last index within a CharSequence from a start position,
handling {@code null}.
This method uses {@link String#lastIndexOf(int, int)} if possible.</p>

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

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

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