See the main description in numberformatter.h for documentation and examples.
More...
#include <numberformatter.h>
|
| NumberFormatter ()=delete |
| Use factory methods instead of the constructor to create a NumberFormatter.
|
|
See the main description in numberformatter.h for documentation and examples.
- Stable:
- ICU 60
Definition at line 2867 of file numberformatter.h.
◆ forSkeleton() [1/2]
◆ forSkeleton() [2/2]
Call this method at the beginning of a NumberFormatter fluent chain to create an instance based on a given number skeleton string.
If an error occurs while parsing the skeleton string, the offset into the skeleton string at which the error occurred will be saved into the UParseError, if provided.
For more information on number skeleton strings, see: https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html
- Parameters
-
skeleton | The skeleton string off of which to base this NumberFormatter. |
perror | A parse error struct populated if an error occurs when parsing. If no error occurs, perror.offset will be set to -1. |
status | Set to U_NUMBER_SKELETON_SYNTAX_ERROR if the skeleton was invalid. |
- Returns
- An UnlocalizedNumberFormatter, to be used for chaining.
- Stable:
- ICU 64
◆ with()
◆ withLocale()
Call this method at the beginning of a NumberFormatter fluent chain in which the locale is known at the call site.
- Parameters
-
locale | The locale from which to load formats and symbols for number formatting. |
- Returns
- A
LocalizedNumberFormatter
, to be used for chaining.
- Stable:
- ICU 60
The documentation for this class was generated from the following file: