ICU 73.2  73.2
Public Member Functions | Static Public Member Functions
icu::number::final Class Reference

See the main description in numberformatter.h for documentation and examples. More...

#include <numberformatter.h>

Public Member Functions

 NumberFormatter ()
 Use factory methods instead of the constructor to create a NumberFormatter.
 NumberRangeFormatter ()
 Use factory methods instead of the constructor to create a NumberFormatter.

Static Public Member Functions

static UnlocalizedNumberFormatter with ()
 Call this method at the beginning of a NumberFormatter fluent chain in which the locale is not currently known at the call site.
static LocalizedNumberFormatter withLocale (const Locale &locale)
 Call this method at the beginning of a NumberFormatter fluent chain in which the locale is known at the call site.
static UnlocalizedNumberFormatter forSkeleton (const UnicodeString &skeleton, UErrorCode &status)
 Call this method at the beginning of a NumberFormatter fluent chain to create an instance based on a given number skeleton string.
static UnlocalizedNumberFormatter forSkeleton (const UnicodeString &skeleton, UParseError &perror, UErrorCode &status)
 Call this method at the beginning of a NumberFormatter fluent chain to create an instance based on a given number skeleton string.
static
UnlocalizedNumberRangeFormatter 
with ()
 Call this method at the beginning of a NumberRangeFormatter fluent chain in which the locale is not currently known at the call site.
static
LocalizedNumberRangeFormatter 
withLocale (const Locale &locale)
 Call this method at the beginning of a NumberRangeFormatter fluent chain in which the locale is known at the call site.

Detailed Description

See the main description in numberformatter.h for documentation and examples.

See the main description in numberrangeformatter.h for documentation and examples.

Stable:
ICU 60
Stable:
ICU 63

Definition at line 2710 of file numberformatter.h.


Member Function Documentation

static UnlocalizedNumberFormatter icu::number::final::forSkeleton ( const UnicodeString skeleton,
UErrorCode status 
) [static]

Call this method at the beginning of a NumberFormatter fluent chain to create an instance based on a given number skeleton string.

It is possible for an error to occur while parsing. See the overload of this method if you are interested in the location of a possible parse error.

For more information on number skeleton strings, see: https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html

Parameters:
skeletonThe skeleton string off of which to base this NumberFormatter.
statusSet to U_NUMBER_SKELETON_SYNTAX_ERROR if the skeleton was invalid.
Returns:
An UnlocalizedNumberFormatter, to be used for chaining.
Stable:
ICU 62
static UnlocalizedNumberFormatter icu::number::final::forSkeleton ( const UnicodeString skeleton,
UParseError perror,
UErrorCode status 
) [static]

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:
skeletonThe skeleton string off of which to base this NumberFormatter.
perrorA parse error struct populated if an error occurs when parsing. If no error occurs, perror.offset will be set to -1.
statusSet to U_NUMBER_SKELETON_SYNTAX_ERROR if the skeleton was invalid.
Returns:
An UnlocalizedNumberFormatter, to be used for chaining.
Stable:
ICU 64

Call this method at the beginning of a NumberRangeFormatter fluent chain in which the locale is not currently known at the call site.

Returns:
An UnlocalizedNumberRangeFormatter, to be used for chaining.
Stable:
ICU 63

Call this method at the beginning of a NumberFormatter fluent chain in which the locale is not currently known at the call site.

Returns:
An UnlocalizedNumberFormatter, to be used for chaining.
Stable:
ICU 60

Call this method at the beginning of a NumberRangeFormatter fluent chain in which the locale is known at the call site.

Parameters:
localeThe locale from which to load formats and symbols for number range formatting.
Returns:
A LocalizedNumberRangeFormatter, to be used for chaining.
Stable:
ICU 63
static LocalizedNumberFormatter icu::number::final::withLocale ( const Locale locale) [static]

Call this method at the beginning of a NumberFormatter fluent chain in which the locale is known at the call site.

Parameters:
localeThe 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 files: