Lines Matching refs:format
30 virtual UnicodeString& format( double number,
35 return NumberFormat::format(number, toAppendTo, posIter, 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,
280 * DecimalFormat.format() incorrectly uses maxFractionDigits setting.
296 logln(" format(d) = '" + df->format(d, sBuf1, fp1) + "'");
301 sBuf2 = df->format(d, sBuf2, fp2);
303 errln(" format(d) = '" + sBuf2 + "'");
328 logln(UnicodeString("format(") + n + ") = " +
329 df->format(n, buf1, pos));
331 logln(UnicodeString("format(") + n + ") = " +
332 df->format(n, buf2, pos));
341 * DecimalFormat.format() incorrectly formats 0.0
353 buffer = df->format(n, buffer, pos);
357 buffer = df->format(n, buffer, pos);
365 * DecimalFormat.format fails when groupingSize is set to 0.
377 logln(df->format((int32_t)123, sBuf, fp));
410 stringValue = nfcommon->format(returnfloat, stringValue);
418 //String stringValue = nfcommon.format(returnfloat).substring(1);
432 DecimalFormat *format = new DecimalFormat("00", status);
437 format->parse(UnicodeString("0"), result, status);
438 failure(status, "format->parse", Locale::getUS());
445 delete format;
484 out = nf->format(x, out, pos);
495 * wrong format. WorkAround : use non-breaking space.
502 // TODO: There is not a good way to find out that the creation of this number format has
503 // failed. Major rewiring of format construction proposed.
505 dataerrln("Something is wrong with French number format - it should not fallback. Exitting - %s", u_errorName(status));
530 logln("nf: " + nf->format((int32_t)1234, temp, pos)); // 1234,00
531 logln("nf: " + nf->format((int32_t)-1234, temp, pos)); // (1234,00)
548 buffer = nf->format((int32_t)1234, buffer, pos);
558 buffer = nf->format((int32_t)-1234, buffer, pos);
597 dstr = df->format(d.getDouble(), dstr, fp);
670 * DecimalFormat.format() loses precision
675 // that NumberFormat can do. For some reason, it does not format the last 1.
689 df->format(d, sb, fp);
691 errln("DecimalFormat.format(): " + sb);
697 * DecimalFormat.format() loses precision
719 logln(UnicodeString(" formated: ") + df->format(d, sb, fp));
781 * DecimalFormat: Negative format ignored.
801 logln(dfFoo->format((int32_t)42, temp, pos));
802 logln(dfFoo->format((int32_t)-42, temp, pos));
807 logln(dfFoo->format((int32_t)42,temp, pos));
808 logln(dfFoo->format((int32_t)-42, temp, pos));
814 logln(dfFoo->format((int32_t)42, temp, pos));
815 logln(dfFoo->format((int32_t)-42, temp, pos));
821 logln(dfFoo->format((int32_t)42, temp, pos));
822 logln(dfFoo->format((int32_t)-42, temp, pos));
830 * NumberFormat.getCurrencyInstance() produces format that uses
864 df->format(1.23, str, pos);
881 * Number format data rounding errors for locale FR
916 tempString = formatter->format (-5789.9876, tempString);
930 tempString = formatter->format( 5789.9876, tempString );
945 tempString = formatter->format (-5789.9876, tempString);
988 tempString = formatter->format (-5789.9876, tempString);
1002 tempString = formatter->format( 5789.9876, tempString );
1016 tempString = formatter->format (-5789.9876, tempString);
1057 tempString = formatter->format (-5789.9876, tempString);
1071 tempString = formatter->format( 5789.9876, tempString );
1085 tempString = formatter->format (-5789.9876, tempString);
1122 tempString = formatter->format (-5789.9876, tempString);
1136 tempString = formatter->format( -5789.9876, tempString );
1150 tempString = formatter->format (-5789.9876, tempString);
1198 out = df->format(x, out, pos);
1219 logln(fmt->format(.001, temp));
1246 tempString = newFmt->format(3456.78, tempString, pos);
1386 fmt->format(num, formatted, field);
1388 errln(UnicodeString("Format 1234.5 failed. Begin index: ") /*+ field.getBeginIndex() + " End index: " + field.getEndIndex()*/);
1421 temp = df->format(num.getDouble(), temp, pos);
1430 temp = df->format(num.getDouble(), temp, pos);
1439 * DecimalFormat.format() incorrectly formats negative doubles.
1463 df->format(d1, buffer, pos);
1467 df->format(d2, buffer, pos);
1514 NumberFormat *format = NumberFormat::createInstance(status);
1517 delete format;
1524 format->parse(text, result, pos);
1528 delete format;
1534 * DecimalFormat.format(long n) fails if n * multiplier > MAX_LONG.
1558 df->format(n, temp, pos));
1568 * DecimalFormat.format incorrectly formats -0.0.
1594 df->format(d, buffer, pos);
1668 errln(UnicodeString("Currency format for ") + UnicodeString(locales[i].getName()) +
1673 // Create a DecimalFormat using the pattern we got and format a number
1681 result1 = fmt1->format(1.111, result1, pos);
1693 // separator to mimic the behavior of a currency format
1731 fmt2->format(1.111, result2, pos);
1748 * DecimalFormat.format() delivers wrong string.
1765 rateString = formatDec->format(rate, rateString, pos);
1774 rateString = formatDec->format(rate, rateString, pos);
1792 f = nf->format(9.02, f, pos);
1799 f = nf->format((int32_t)0, f, pos);
1821 * Value 1.2 Format #.00 Result '01.20' !!!wrong
1822 * Value 1.2 Format 0.00 Result '001.20' !!!wrong
1823 * Value 1.2 Format 00.00 Result '0001.20' !!!wrong
1824 * Value 1.2 Format #0.0# Result '1.2'
1825 * Value 1.2 Format #0.00 Result '001.20' !!!wrong
1828 * Value 1.2 Format #.00 Result '1.20'
1829 * Value 1.2 Format 0.00 Result '1.20'
1830 * Value 1.2 Format 00.00 Result '01.20'
1831 * Value 1.2 Format #0.0# Result '1.2'
1832 * Value 1.2 Format #0.00 Result '1.20'
1850 result = df->format(1.2, result, pos);
1877 s = f->format(123.456, s, pos);
1879 errln("Fail: Format empty pattern x 123.456 => " + s);
1881 s = f->format(-123.456, s, pos);
1883 errln("Fail: Format empty pattern x -123.456 => " + s);
1897 String sd = NumberFormat.getInstance(Locale.US).format(bd);
1898 if (!sd.endsWith("67")) errln("Fail: " + str + " x format -> " + sd);
1939 out = nf->format(pi, out, pos);
1950 out2 = nf->format(pi, out2, pos);
2035 f1 = df->format(d1, f1, pos);
2036 f2 = df->format(d2, f2, pos);
2058 String nowStr = _dateFormat.format(t);
2065 * NumberFormat cannot format Double.MAX_VALUE
2076 dataerrln("Couldn't create number format - %s", u_errorName(status));
2082 f->format(dbl,s);
2120 dataerrln("Couldn't create number format - %s", u_errorName(status));
2126 f->format(d, s);
2163 fmt->format(a, s);
2275 fmt.format(in, out, pos);
2309 if (fmt.format((int32_t)-1, s, pos) != UNICODE_STRING("^1", 2)) {
2325 if (fmt.format(0.25, s, pos) != UNICODE_STRING("25^", 3)) {
2341 if (fmt.format(0.25, s, pos) != UNICODE_STRING("250^", 4)) {
2357 if (fmt.format(12.5, s, pos) != UnicodeString("usd12.50")) {
2373 if (fmt.format(12.5, s, pos) != UnicodeString("DOL12.50")) {
2448 if (j == 1) { // Currency format
2528 fmt->format(D[i], s);
2550 nf->format(a, s);
2579 fmt.format(NUM[i], str, pos);
2592 * format(0.0) gives "0.1" if preceded by parse("99.99").
2607 fmt.format(0.0, str, pos);
2629 fmt.format(0.0, str, pos);
2682 // format back to a string
2684 df->format(ulocdat, outString);