docs: public static boolean tagcmp(String tag1, String tag2) {
          if(tag1 == tag2) return true;
          if(tag1 == null || tag2 == null) return false;
          if(tag1.equals(tag2)) return true;
          int slen1 = tag1.indexOf('#');
          if(slen1 == -1) slen1 = tag1.length();
          int slen2 = tag2.indexOf('#');
          if(slen2 == -1) slen2 = tag2.length();
          return tag1.substring(0, slen1).equals(tag2.substring(0,slen2));
      }