Lines Matching refs:Format
37 #include "unicode/format.h"
63 * NumberFormat helps you to format and parse numbers for any locale.
66 * decimal digits used, or whether the number format is even decimal.
68 * To format a number for the current Locale, use one of the static
82 * nf->format(myNumber, myString);
90 * the format and use it multiple times so that the system doesn't
98 * nf->format(number, myString);
103 * To format a number for a different Locale, specify it in the
114 * Use \c createInstance() to get the normal number format for a \c Locale.
116 * to get the currency number format for that country. Use \c createPercentInstance()
117 * to get a format for displaying percentages. With this format, a
122 * \c createInstance(locale, UNUM_DECIMAL, errorCode) to get the normal number format,\n
123 * \c createInstance(locale, UNUM_PERCENT, errorCode) to get a format for displaying percentage,\n
124 * \c createInstance(locale, UNUM_SCIENTIFIC, errorCode) to get a format for displaying scientific number,\n
125 * \c createInstance(locale, UNUM_CURRENCY, errorCode) to get the currency number format,
127 * \c createInstance(locale, UNUM_CURRENCY_ISO, errorCode) to get the currency number format,
129 * \c createInstance(locale, UNUM_CURRENCY_PLURAL, errorCode) to get the currency number format,
130 * in which the currency is represented by its full name in plural format,
135 * format or parsing, or want to give your users more control, you can
141 * You can also use forms of the parse and format methods with
150 * can pass the \c FieldPosition in your format call, with field =
169 class U_I18N_API NumberFormat : public Format {
177 * support identification of all number format fields, not just those
227 * Return true if the given Format objects are semantically equal.
229 * @return true if the given Format objects are semantically equal.
232 virtual UBool operator==(const Format& other) const;
235 using Format::format;
238 * Format an object to produce a string. This method handles
243 * @param obj The object to format.
252 virtual UnicodeString& format(const Formattable& obj,
258 * Format an object to produce a string. This method handles
263 * @param obj The object to format.
267 * of fields generated by this format call. Can be
273 virtual UnicodeString& format(const Formattable& obj,
291 * See Format::parseObject() for more.
311 * Format a double number. These methods call the NumberFormat
312 * pure virtual format() methods with the default FieldPosition.
320 UnicodeString& format( double number,
324 * Format a long number. These methods call the NumberFormat
325 * pure virtual format() methods with the default FieldPosition.
333 UnicodeString& format( int32_t number,
337 * Format an int64 number. These methods call the NumberFormat
338 * pure virtual format() methods with the default FieldPosition.
346 UnicodeString& format( int64_t number,
350 * Format a double number. Concrete subclasses must implement
361 virtual UnicodeString& format(double number,
365 * Format a double number. By default, the parent function simply
378 virtual UnicodeString& format(double number,
383 * Format a double number. Subclasses must implement
390 * of fields generated by this format call.
396 virtual UnicodeString& format(double number,
401 * Format a long number. Concrete subclasses must implement
412 virtual UnicodeString& format(int32_t number,
417 * Format a long number. Concrete subclasses may override
429 virtual UnicodeString& format(int32_t number,
435 * Format an int32 number. Subclasses must implement
442 * of fields generated by this format call.
448 virtual UnicodeString& format(int32_t number,
453 * Format an int64 number. (Not abstract to retain compatibility
455 * method as it just delegates to format(int32_t number...);
465 virtual UnicodeString& format(int64_t number,
470 * Format an int64 number. (Not abstract to retain compatibility
472 * method as it just delegates to format(int32_t number...);
483 virtual UnicodeString& format(int64_t number,
488 * Format an int64 number. Subclasses must implement
495 * of fields generated by this format call.
501 virtual UnicodeString& format(int64_t number,
507 * Format a decimal number. Subclasses must implement
516 * of fields generated by this format call.
522 virtual UnicodeString& format(StringPiece number,
528 * Format a decimal number.
535 * @param number The number, a DigitList format Decimal Floating Point.
539 * of fields generated by this format call.
544 virtual UnicodeString& format(const DigitList &number,
550 * Format a decimal number.
557 * @param number The number, a DigitList format Decimal Floating Point.
566 virtual UnicodeString& format(const DigitList &number,
618 * This method will fail if this format is not a currency format,
636 * Return true if this format will parse numbers as integers
640 * the exact format accepted by the parse operation is locale
642 * @return true if this format will parse numbers as integers
650 * @param value set True, this format will parse numbers as integers
729 * Returns a currency format for the current default locale.
735 * Returns a currency format for the specified locale.
743 * Returns a percentage format for the current default locale.
749 * Returns a percentage format for the specified locale.
757 * Returns a scientific format for the current default locale.
763 * Returns a scientific format for the specified locale.
814 * Returns true if grouping is used in this format. For example,
825 * Set whether or not grouping will be used in this format.
826 * @param newValue True, grouping will be used in this format.
924 * amounts. This takes effect immediately, if this format is a
925 * currency format. If this format is not a currency format, then
927 * currency format.
1025 * Creates the specified number format style of the desired locale.
1041 * Creates the specified decimal format style of the desired locale.
1111 * Return a number format of the appropriate type. If the locale