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));
527 logln("nf: " + nf->format((int32_t)1234, temp, pos)); // 1234,00
528 logln("nf: " + nf->format((int32_t)-1234, temp, pos)); // (1234,00)
545 buffer = nf->format((int32_t)1234, buffer, pos);
555 buffer = nf->format((int32_t)-1234, buffer, pos);
594 dstr = df->format(d.getDouble(), dstr, fp);
667 * DecimalFormat.format() loses precision
672 // that NumberFormat can do. For some reason, it does not format the last 1.
686 df->format(d, sb, fp);
688 errln("DecimalFormat.format(): " + sb);
694 * DecimalFormat.format() loses precision
716 logln(" formated: " + df->format(d, sb, fp));
778 * DecimalFormat: Negative format ignored.
798 logln(dfFoo->format((int32_t)42, temp, pos));
799 logln(dfFoo->format((int32_t)-42, temp, pos));
804 logln(dfFoo->format((int32_t)42,temp, pos));
805 logln(dfFoo->format((int32_t)-42, temp, pos));
811 logln(dfFoo->format((int32_t)42, temp, pos));
812 logln(dfFoo->format((int32_t)-42, temp, pos));
818 logln(dfFoo->format((int32_t)42, temp, pos));
819 logln(dfFoo->format((int32_t)-42, temp, pos));
827 * NumberFormat.getCurrencyInstance() produces format that uses
861 df->format(1.23, str, pos);
878 * Number format data rounding errors for locale FR
913 tempString = formatter->format (-5789.9876, tempString);
927 tempString = formatter->format( 5789.9876, tempString );
942 tempString = formatter->format (-5789.9876, tempString);
985 tempString = formatter->format (-5789.9876, tempString);
999 tempString = formatter->format( 5789.9876, tempString );
1013 tempString = formatter->format (-5789.9876, tempString);
1054 tempString = formatter->format (-5789.9876, tempString);
1068 tempString = formatter->format( 5789.9876, tempString );
1082 tempString = formatter->format (-5789.9876, tempString);
1119 tempString = formatter->format (-5789.9876, tempString);
1133 tempString = formatter->format( -5789.9876, tempString );
1147 tempString = formatter->format (-5789.9876, tempString);
1195 out = df->format(x, out, pos);
1216 logln(fmt->format(.001, temp));
1243 tempString = newFmt->format(3456.78, tempString, pos);
1383 fmt->format(num, formatted, field);
1385 errln(UnicodeString("Format 1234.5 failed. Begin index: ") /*+ field.getBeginIndex() + " End index: " + field.getEndIndex()*/);
1418 temp = df->format(num.getDouble(), temp, pos);
1427 temp = df->format(num.getDouble(), temp, pos);
1436 * DecimalFormat.format() incorrectly formats negative doubles.
1460 df->format(d1, buffer, pos);
1464 df->format(d2, buffer, pos);
1511 NumberFormat *format = NumberFormat::createInstance(status);
1514 delete format;
1521 format->parse(text, result, pos);
1525 delete format;
1531 * DecimalFormat.format(long n) fails if n * multiplier > MAX_LONG.
1555 df->format(n, temp, pos));
1565 * DecimalFormat.format incorrectly formats -0.0.
1591 df->format(d, buffer, pos);
1659 errln(UnicodeString("Currency format for ") + UnicodeString(locales[i].getName()) +
1664 // Create a DecimalFormat using the pattern we got and format a number
1672 result1 = fmt1->format(1.111, result1, pos);
1684 // separator to mimic the behavior of a currency format
1722 fmt2->format(1.111, result2, pos);
1739 * DecimalFormat.format() delivers wrong string.
1756 rateString = formatDec->format(rate, rateString, pos);
1765 rateString = formatDec->format(rate, rateString, pos);
1783 f = nf->format(9.02, f, pos);
1790 f = nf->format((int32_t)0, f, pos);
1812 * Value 1.2 Format #.00 Result '01.20' !!!wrong
1813 * Value 1.2 Format 0.00 Result '001.20' !!!wrong
1814 * Value 1.2 Format 00.00 Result '0001.20' !!!wrong
1815 * Value 1.2 Format #0.0# Result '1.2'
1816 * Value 1.2 Format #0.00 Result '001.20' !!!wrong
1819 * Value 1.2 Format #.00 Result '1.20'
1820 * Value 1.2 Format 0.00 Result '1.20'
1821 * Value 1.2 Format 00.00 Result '01.20'
1822 * Value 1.2 Format #0.0# Result '1.2'
1823 * Value 1.2 Format #0.00 Result '1.20'
1841 result = df->format(1.2, result, pos);
1868 s = f->format(123.456, s, pos);
1870 errln("Fail: Format empty pattern x 123.456 => " + s);
1872 s = f->format(-123.456, s, pos);
1874 errln("Fail: Format empty pattern x -123.456 => " + s);
1888 String sd = NumberFormat.getInstance(Locale.US).format(bd);
1889 if (!sd.endsWith("67")) errln("Fail: " + str + " x format -> " + sd);
1930 out = nf->format(pi, out, pos);
1941 out2 = nf->format(pi, out2, pos);
2025 f1 = df->format(d1, f1, pos);
2026 f2 = df->format(d2, f2, pos);
2048 String nowStr = _dateFormat.format(t);
2055 * NumberFormat cannot format Double.MAX_VALUE
2066 dataerrln("Couldn't create number format - %s", u_errorName(status));
2072 f->format(dbl,s);
2110 dataerrln("Couldn't create number format - %s", u_errorName(status));
2116 f->format(d, s);
2153 fmt->format(a, s);
2265 fmt.format(in, out, pos);
2299 if (fmt.format((int32_t)-1, s, pos) != UNICODE_STRING("^1", 2)) {
2315 if (fmt.format(0.25, s, pos) != UNICODE_STRING("25^", 3)) {
2331 if (fmt.format(0.25, s, pos) != UNICODE_STRING("250^", 4)) {
2347 if (fmt.format(12.5, s, pos) != UnicodeString("usd12.50")) {
2363 if (fmt.format(12.5, s, pos) != UnicodeString("DOL12.50")) {
2433 if (j == 1) { // Currency format
2513 fmt->format(D[i], s);
2535 nf->format(a, s);
2564 fmt.format(NUM[i], str, pos);
2577 * format(0.0) gives "0.1" if preceded by parse("99.99").
2592 fmt.format(0.0, str, pos);
2614 fmt.format(0.0, str, pos);
2667 // format back to a string
2669 df->format(ulocdat, outString);