docs: public boolean matches(String pattern, String itemName) {
          int index = pattern.indexOf('*');
          if (index == -1) {
              return itemName.equals(pattern);
          }
  
          String firstPart = pattern.substring(0, index);
          int indexFirstPart = itemName.indexOf(firstPart, 0);
          if (indexFirstPart == -1) {
              return false;
          }
  
          String secondPart = pattern.substring(index + 1);
          int indexSecondPart = itemName.indexOf(secondPart, index + 1);
          return (indexSecondPart != -1);
      }