code: public static int toChars(int i, char[] buf, int offset) {
          if (i < 0) {
              if (i == Integer.MIN_VALUE) {
                  writeMinInteger(buf, offset);
                  return offset + 11;
              }
              buf[offset++] = '-';
              i = -i;
          }
  
          offset += stringSizeOf(i);
          getChars(i, offset, buf);
          return offset;
      }
docs: /*
  @return new offset in char buffer