private @Nullable FList<TextRange> matchBySubstring(@NotNull String name) {
    boolean infix = isPatternChar(0, '*');
    char[] patternWithoutWildChar = filterWildcard(myPattern);
    if (name.length() < patternWithoutWildChar.length) {
      return null;
    }
    if (infix) {
      int index = Strings.indexOfIgnoreCase(name, new CharArrayCharSequence(patternWithoutWildChar, 0, patternWithoutWildChar.length), 0);
      if (index >= 0) {
        return FList.singleton(TextRange.from(index, patternWithoutWildChar.length - 1));
      }
      return null;
    }
    if (CharArrayUtil.regionMatches(patternWithoutWildChar, 0, patternWithoutWildChar.length, name)) {
      return FList.singleton(new TextRange(0, patternWithoutWildChar.length));
    }
    return null;
  }
private @Nullable FList<TextRange> matchBySubstring(@NotNull String name)