Home | History | Annotate | Download | only in unicode

Lines Matching refs:format

35 #include "unicode/format.h"
54 * NumberFormat helps you to format and parse numbers for any locale.
57 * decimal digits used, or whether the number format is even decimal.
59 * To format a number for the current Locale, use one of the static
67 * nf->format(myNumber, myString);
72 * the format and use it multiple times so that the system doesn't
84 * nf->format(a[i], myString);
90 * To format a number for a different Locale, specify it in the
105 * Use createInstance to get the normal number format for that country.
107 * to get the currency number format for that country. Use getPercent
108 * to get a format for displaying percentages. With this format, a
114 * use createInstance(...kNumberStyle...) to get the normal number format,
115 * createInstance(...kPercentStyle...) to get a format for displaying
117 * createInstance(...kScientificStyle...) to get a format for displaying
119 * createInstance(...kCurrencyStyle...) to get the currency number format,
121 * createInstance(...kIsoCurrencyStyle...) to get the currency number format,
123 * createInstance(...kPluralCurrencyStyle...) to get the currency number format,
124 * in which the currency is represented by its full name in plural format,
129 * format or parsing, or want to give your users more control, you can
135 * You can also use forms of the parse and format methods with
144 * can pass the FieldPosition in your format call, with field =
163 class U_I18N_API NumberFormat : public Format {
167 * Constants for various number format styles.
168 * kNumberStyle specifies a normal number style of format.
169 * kCurrencyStyle specifies a currency format using currency symbol name,
171 * kPercentStyle specifies a style of format to display percent.
172 * kScientificStyle specifies a style of format to display scientific number.
173 * kISOCurrencyStyle specifies a currency format using ISO currency code,
175 * kPluralCurrencyStyle specifies a currency format using currency plural
195 * support identification of all number format fields, not just those
230 * Return true if the given Format objects are semantically equal.
232 * @return true if the given Format objects are semantically equal.
235 virtual UBool operator==(const Format& other) const;
238 using Format::format;
241 * Format an object to produce a string. This method handles
246 * @param obj The object to format.
255 virtual UnicodeString& format(const Formattable& obj,
261 * Format an object to produce a string. This method handles
266 * @param obj The object to format.
270 * of fields generated by this format call. Can be
276 virtual UnicodeString& format(const Formattable& obj,
294 * See Format::parseObject() for more.
314 * Format a double number. These methods call the NumberFormat
315 * pure virtual format() methods with the default FieldPosition.
323 UnicodeString& format( double number,
327 * Format a long number. These methods call the NumberFormat
328 * pure virtual format() methods with the default FieldPosition.
336 UnicodeString& format( int32_t number,
340 * Format an int64 number. These methods call the NumberFormat
341 * pure virtual format() methods with the default FieldPosition.
349 UnicodeString& format( int64_t number,
353 * Format a double number. Concrete subclasses must implement
364 virtual UnicodeString& format(double number,
368 * Format a double number. Subclasses must implement
375 * of fields generated by this format call.
381 virtual UnicodeString& format(double number,
386 * Format a long number. Concrete subclasses must implement
397 virtual UnicodeString& format(int32_t number,
402 * Format an int32 number. Subclasses must implement
409 * of fields generated by this format call.
415 virtual UnicodeString& format(int32_t number,
420 * Format an int64 number. (Not abstract to retain compatibility
422 * method as it just delegates to format(int32_t number...);
432 virtual UnicodeString& format(int64_t number,
436 * Format an int64 number. Subclasses must implement
443 * of fields generated by this format call.
449 virtual UnicodeString& format(int64_t number,
455 * Format a decimal number. Subclasses must implement
464 * of fields generated by this format call.
470 virtual UnicodeString& format(const StringPiece &number,
476 * Format a decimal number.
483 * @param number The number, a DigitList format Decimal Floating Point.
487 * of fields generated by this format call.
492 virtual UnicodeString& format(const DigitList &number,
498 * Format a decimal number.
505 * @param number The number, a DigitList format Decimal Floating Point.
514 virtual UnicodeString& format(const DigitList &number,
522 * Redeclared Format method.
531 UnicodeString& format(const Formattable& obj,
584 * This method will fail if this format is not a currency format,
603 * Return true if this format will parse numbers as integers
607 * the exact format accepted by the parse operation is locale
609 * @return true if this format will parse numbers as integers
617 * @param value set True, this format will parse numbers as integers
625 * Returns the default number format for the current default
626 * locale. The default format is one of the styles provided by
635 * Returns the default number format for the specified locale.
636 * The default format is one of the styles provided by the other
646 * Creates the specified decimal format style of the desired locale.
657 * Returns a currency format for the current default locale.
663 * Returns a currency format for the specified locale.
671 * Returns a percentage format for the current default locale.
677 * Returns a percentage format for the specified locale.
685 * Returns a scientific format for the current default locale.
691 * Returns a scientific format for the specified locale.
736 * Returns true if grouping is used in this format. For example,
747 * Set whether or not grouping will be used in this format.
748 * @param newValue True, grouping will be used in this format.
846 * amounts. This takes effect immediately, if this format is a
847 * currency format. If this format is not a currency format, then
849 * currency format.
925 * Creates the specified decimal format style of the desired locale.
981 * Return a number format of the appropriate type. If the locale
1040 NumberFormat::format(const Formattable& obj,
1043 return Format::format(obj, appendTo, status);