docs: public static final void format(StringBuilder sb, double v, String format)
      {
          sb.append(String.format(Locale.US, format, v));
          int length = sb.length();
          while (true)
          {
              char cc = sb.charAt(length-1);
              if (cc == '.')
              {
                  length--;
                  break;
              }
              if (cc != '0')
              {
                  break;
              }
              length--;
          }
          sb.setLength(length);
      }