int (@NotNull CharSequence s1, @NotNull CharSequence s2, boolean ignoreCase) { int i; int minLength = Math.min(s1.length(), s2.length()); for (i = 0; i < minLength; i++) { if (!Strings.charsMatch(s1.charAt(i), s2.charAt(i), ignoreCase)) { break; } } return i; }