code: public static void append2digits(StringBuilder buf, int i) {
          if (i < 100) {
              buf.append((char) (i / 10 + '0'));
              buf.append((char) (i % 10 + '0'));
          }
      }
docs: Append 2 digits (zero padded) to the StringBuilder
  
  @param buf the buffer to append to
  @param i   the value to append