docs: public static String expand(String tmpl, String tn, long gn) {
          Preconditions.checkArgument(
                  tmpl != null && !tmpl.trim().isEmpty(),
                  "null or empty format string"
                  );
          Preconditions.checkArgument(
                  tn != null && !tn.trim().isEmpty(),
                  "null or empty table name"
                  );
  
          int conversionMask = conversionMaskFor(tmpl);
  
          Preconditions.checkArgument(
                  (conversionMask & TABLE) == TABLE,
                  "\"" + tmpl + "\" must contain at least the (%t)able conversion"
                  );
          Preconditions.checkArgument(
                  (conversionMask & ~(TABLE|GENERATION)) == 0,
                  "\"" + tmpl + "\" may only contain the (%t)able, and the (%g)generation conversions"
                  );
  
          StringBuilder sb = new StringBuilder(tmpl.length()+256).append(tmpl);
          for (int i = 0; i < sb.length();) {
              if (isEscaped(sb,i)) {
                  sb.deleteCharAt(i);
                  i += 1;
              } else if (isExpandable(sb,i)) {
                  String r = "";
                  switch(sb.charAt(i+1)) {
                  case 't': r = tn; break;
                  case 'g':
                      r = Long.toString(gn, Character.MAX_RADIX);
                      break;
                  }
                  sb.replace(i,i+2,r);
                  i += r.length();
              } else {
                  i += 1;
              }
          }
          return sb.toString();
      }