public static int indexOfIgnoreCase(CharSequence str, CharSequence searchStr, int startPos) {
        if (str == null || searchStr == null) {
            return INDEX_NOT_FOUND;
        }
        if (startPos < 0) {
            startPos = 0;
        }
        int endLimit = str.length() - searchStr.length() + 1;
        if (startPos > endLimit) {
            return INDEX_NOT_FOUND;
        }
        if (searchStr.length() == 0) {
            return startPos;
        }
        for (int i = startPos; i < endLimit; i++) {
            if (CharSequenceUtils.regionMatches(str, true, i, searchStr, 0, searchStr.length())) {
                return i;
            }
        }
        return INDEX_NOT_FOUND;
    }
<p>Case in-sensitive find of the first index within a CharSequence
from the specified position.</p>

<p>A {@code null} CharSequence will return {@code -1}.
A negative start position is treated as zero.
An empty ("") search CharSequence always matches.
A start position greater than the string length only matches
an empty search CharSequence.</p>

<pre>
StringUtils.indexOfIgnoreCase(null, *, *)          = -1
StringUtils.indexOfIgnoreCase(*, null, *)          = -1
StringUtils.indexOfIgnoreCase("", "", 0)           = 0
StringUtils.indexOfIgnoreCase("aabaabaa", "A", 0)  = 0
StringUtils.indexOfIgnoreCase("aabaabaa", "B", 0)  = 2
StringUtils.indexOfIgnoreCase("aabaabaa", "AB", 0) = 1
StringUtils.indexOfIgnoreCase("aabaabaa", "B", 3)  = 5
StringUtils.indexOfIgnoreCase("aabaabaa", "B", 9)  = -1
StringUtils.indexOfIgnoreCase("aabaabaa", "B", -1) = 2
StringUtils.indexOfIgnoreCase("aabaabaa", "", 2)   = 2
StringUtils.indexOfIgnoreCase("abc", "", 9)        = 3
</pre>

@param str  the CharSequence to check, may be null
@param searchStr  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.5
@since 3.0 Changed signature from indexOfIgnoreCase(String, String, int) to indexOfIgnoreCase(CharSequence, CharSequence, int)
android/android_framework/base/src/main/java/lang3/StringUtils.java