ICU 62.1 62.1
Public Member Functions | Static Public Member Functions
icu::number::NumberFormatter Class Referencefinal

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

#include <numberformatter.h>

Public Member Functions

 NumberFormatter ()=delete
 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.
 

Detailed Description

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

Draft
This API may be changed in the future versions and was introduced in ICU 60

Definition at line 2598 of file numberformatter.h.

Member Function Documentation

◆ forSkeleton()

static UnlocalizedNumberFormatter icu::number::NumberFormatter::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.

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.
Draft
This API may be changed in the future versions and was introduced in ICU 62

◆ with()

static UnlocalizedNumberFormatter icu::number::NumberFormatter::with ( )
static

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.
Draft
This API may be changed in the future versions and was introduced in ICU 60

◆ withLocale()

static LocalizedNumberFormatter icu::number::NumberFormatter::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.
Draft
This API may be changed in the future versions and was introduced in ICU 60

The documentation for this class was generated from the following file: