Lines Matching refs:format
30 virtual UnicodeString& format( double number,
35 return NumberFormat::format(number, toAppendTo, pos, status);
39 virtual UnicodeString& format(const Formattable& obj,
44 return NumberFormat::format(obj, toAppendTo, pos, status);
47 /* Just use one of the format functions */
48 virtual UnicodeString& format( double /* number */,
75 virtual Format* clone() const
78 virtual UnicodeString& format(int32_t,
83 virtual UnicodeString& format(int64_t,
276 * DecimalFormat.format() incorrectly uses maxFractionDigits setting.
292 logln(" format(d) = '" + df->format(d, sBuf1, fp1) + "'");
297 sBuf2 = df->format(d, sBuf2, fp2);
299 errln(" format(d) = '" + sBuf2 + "'");
324 logln(UnicodeString("format(") + n + ") = " +
325 df->format(n, buf1, pos));
327 logln(UnicodeString("format(") + n + ") = " +
328 df->format(n, buf2, pos));
337 * DecimalFormat.format() incorrectly formats 0.0
349 buffer = df->format(n, buffer, pos);
353 buffer = df->format(n, buffer, pos);
361 * DecimalFormat.format fails when groupingSize is set to 0.
373 logln(df->format((int32_t)123, sBuf, fp));
406 stringValue = nfcommon->format(returnfloat, stringValue);
414 //String stringValue = nfcommon.format(returnfloat).substring(1);
428 DecimalFormat *format = new DecimalFormat("00", status);
433 format->parse(UnicodeString("0"), result, status);
434 failure(status, "format->parse", Locale::getUS());
441 delete format;
480 out = nf->format(x, out, pos);
491 * wrong format. WorkAround : use non-breaking space.
498 // TODO: There is not a good way to find out that the creation of this number format has
499 // failed. Major rewiring of format construction proposed.
501 dataerrln("Something is wrong with French number format - it should not fallback. Exitting - %s", u_errorName(status));
526 logln("nf: " + nf->format((int32_t)1234, temp, pos)); // 1234,00
527 logln("nf: " + nf->format((int32_t)-1234, temp, pos)); // (1234,00)
544 buffer = nf->format((int32_t)1234, buffer, pos);
554 buffer = nf->format((int32_t)-1234, buffer, pos);
593 dstr = df->format(d.getDouble(), dstr, fp);
666 * DecimalFormat.format() loses precision
671 // that NumberFormat can do. For some reason, it does not format the last 1.
685 df->format(d, sb, fp);
687 errln("DecimalFormat.format(): " + sb);
693 * DecimalFormat.format() loses precision
715 logln(" formated: " + df->format(d, sb, fp));
777 * DecimalFormat: Negative format ignored.
797 logln(dfFoo->format((int32_t)42, temp, pos));
798 logln(dfFoo->format((int32_t)-42, temp, pos));
803 logln(dfFoo->format((int32_t)42,temp, pos));
804 logln(dfFoo->format((int32_t)-42, temp, pos));
810 logln(dfFoo->format((int32_t)42, temp, pos));
811 logln(dfFoo->format((int32_t)-42, temp, pos));
817 logln(dfFoo->format((int32_t)42, temp, pos));
818 logln(dfFoo->format((int32_t)-42, temp, pos));
826 * NumberFormat.getCurrencyInstance() produces format that uses
860 df->format(1.23, str, pos);
877 * Number format data rounding errors for locale FR
912 tempString = formatter->format (-5789.9876, tempString);
926 tempString = formatter->format( 5789.9876, tempString );
941 tempString = formatter->format (-5789.9876, tempString);
984 tempString = formatter->format (-5789.9876, tempString);
998 tempString = formatter->format( 5789.9876, tempString );
1012 tempString = formatter->format (-5789.9876, tempString);
1053 tempString = formatter->format (-5789.9876, tempString);
1067 tempString = formatter->format( 5789.9876, tempString );
1081 tempString = formatter->format (-5789.9876, tempString);
1118 tempString = formatter->format (-5789.9876, tempString);
1132 tempString = formatter->format( -5789.9876, tempString );
1146 tempString = formatter->format (-5789.9876, tempString);
1194 out = df->format(x, out, pos);
1215 logln(fmt->format(.001, temp));
1242 tempString = newFmt->format(3456.78, tempString, pos);
1382 fmt->format(num, formatted, field);
1384 errln(UnicodeString("Format 1234.5 failed. Begin index: ") /*+ field.getBeginIndex() + " End index: " + field.getEndIndex()*/);
1417 temp = df->format(num.getDouble(), temp, pos);
1426 temp = df->format(num.getDouble(), temp, pos);
1435 * DecimalFormat.format() incorrectly formats negative doubles.
1459 df->format(d1, buffer, pos);
1463 df->format(d2, buffer, pos);
1510 NumberFormat *format = NumberFormat::createInstance(status);
1513 delete format;
1520 format->parse(text, result, pos);
1524 delete format;
1530 * DecimalFormat.format(long n) fails if n * multiplier > MAX_LONG.
1554 df->format(n, temp, pos));
1564 * DecimalFormat.format incorrectly formats -0.0.
1590 df->format(d, buffer, pos);
1664 errln(UnicodeString("Currency format for ") + UnicodeString(locales[i].getName()) +
1669 // Create a DecimalFormat using the pattern we got and format a number
1677 result1 = fmt1->format(1.111, result1, pos);
1689 // separator to mimic the behavior of a currency format
1727 fmt2->format(1.111, result2, pos);
1744 * DecimalFormat.format() delivers wrong string.
1761 rateString = formatDec->format(rate, rateString, pos);
1770 rateString = formatDec->format(rate, rateString, pos);
1788 f = nf->format(9.02, f, pos);
1795 f = nf->format((int32_t)0, f, pos);
1817 * Value 1.2 Format #.00 Result '01.20' !!!wrong
1818 * Value 1.2 Format 0.00 Result '001.20' !!!wrong
1819 * Value 1.2 Format 00.00 Result '0001.20' !!!wrong
1820 * Value 1.2 Format #0.0# Result '1.2'
1821 * Value 1.2 Format #0.00 Result '001.20' !!!wrong
1824 * Value 1.2 Format #.00 Result '1.20'
1825 * Value 1.2 Format 0.00 Result '1.20'
1826 * Value 1.2 Format 00.00 Result '01.20'
1827 * Value 1.2 Format #0.0# Result '1.2'
1828 * Value 1.2 Format #0.00 Result '1.20'
1846 result = df->format(1.2, result, pos);
1873 s = f->format(123.456, s, pos);
1875 errln("Fail: Format empty pattern x 123.456 => " + s);
1877 s = f->format(-123.456, s, pos);
1879 errln("Fail: Format empty pattern x -123.456 => " + s);
1893 format(bd);
1894 if (!sd.endsWith("67")) errln("Fail: " + str + " x format -> " + sd);
1935 out = nf->format(pi, out, pos);
1946 out2 = nf->format(pi, out2, pos);
2031 f1 = df->format(d1, f1, pos);
2032 f2 = df->format(d2, f2, pos);
2054 String nowStr = _dateFormat.format(t);
2061 * NumberFormat cannot format Double.MAX_VALUE
2072 dataerrln("Couldn't create number format - %s", u_errorName(status));
2078 f->format(dbl,s);
2116 dataerrln("Couldn't create number format - %s", u_errorName(status));
2122 f->format(d, s);
2159 fmt->format(a, s);
2271 fmt.format(in, out, pos);
2305 if (fmt.format((int32_t)-1, s, pos) != UNICODE_STRING("^1", 2)) {
2321 if (fmt.format(0.25, s, pos) != UNICODE_STRING("25^", 3)) {
2337 if (fmt.format(0.25, s, pos) != UNICODE_STRING("250^", 4)) {
2353 if (fmt.format(12.5, s, pos) != UnicodeString("usd12.50")) {
2369 if (fmt.format(12.5, s, pos) != UnicodeString("DOL12.50")) {
2444 if (j == 1) { // Currency format
2524 fmt->format(D[i], s);
2546 nf->format(a, s);
2575 fmt.format(NUM[i], str, pos);
2588 * format(0.0) gives "0.1" if preceded by parse("99.99").
2603 fmt.format(0.0, str, pos);
2625 fmt.format(0.0, str, pos);
2678 // format back to a string
2680 df->format(ulocdat, outString);