public static boolean equalsIgnoreCase(CharSequence str1, CharSequence str2) {
        if (str1 == null || str2 == null) {
            return str1 == str2;
        } else {
            return CharSequenceUtils.regionMatches(str1, true, 0, str2, 0, Math.max(str1.length(), str2.length()));
        }
    }
<p>Compares two CharSequences, returning {@code true} if they are equal ignoring
the case.</p>

<p>{@code null}s are handled without exceptions. Two {@code null}
references are considered equal. Comparison is case insensitive.</p>

<pre>
StringUtils.equalsIgnoreCase(null, null)   = true
StringUtils.equalsIgnoreCase(null, "abc")  = false
StringUtils.equalsIgnoreCase("abc", null)  = false
StringUtils.equalsIgnoreCase("abc", "abc") = true
StringUtils.equalsIgnoreCase("abc", "ABC") = true
</pre>

@param str1  the first CharSequence, may be null
@param str2  the second CharSequence, may be null
@return {@code true} if the CharSequence are equal, case insensitive, or
 both {@code null}
@since 3.0 Changed signature from equalsIgnoreCase(String, String) to equalsIgnoreCase(CharSequence, CharSequence)
android/android_framework/base/src/main/java/lang3/StringUtils.java