int (@NotNull String name, int patternIndex, int nameIndex) { if (!isFirstCharMatching(name, nameIndex, patternIndex)) { return 0; } int i = 1; boolean ignoreCase = myOptions != NameUtil.MatchingCaseSensitivity.ALL; while (nameIndex + i < name.length() && patternIndex + i < myPattern.length) { char nameChar = name.charAt(nameIndex + i); if (!charEquals(myPattern[patternIndex + i], patternIndex + i, nameChar, ignoreCase)) { if (isSkippingDigitBetweenPatternDigits(patternIndex + i, nameChar)) { return 0; } break; } i++; } return i; }