icu::number::LocalizedNumberFormatter Class Reference

A NumberFormatter that has a locale associated with it; this means .format() methods are available. More...

#include <numberformatter.h>

Inheritance diagram for icu::number::LocalizedNumberFormatter:
icu::number::NumberFormatterSettings< LocalizedNumberFormatter > icu::UMemory

Public Member Functions

FormattedNumber formatInt (int64_t value, UErrorCode &status) const
 Format the given integer number to a string using the settings specified in the NumberFormatter fluent setting chain.
FormattedNumber formatDouble (double value, UErrorCode &status) const
 Format the given float or double to a string using the settings specified in the NumberFormatter fluent setting chain.
FormattedNumber formatDecimal (StringPiece value, UErrorCode &status) const
 Format the given decimal number to a string using the settings specified in the NumberFormatter fluent setting chain.
 LocalizedNumberFormatter (const LocalizedNumberFormatter &other)
 Returns a copy of this LocalizedNumberFormatter.
 ~LocalizedNumberFormatter ()
 Destruct this LocalizedNumberFormatter, cleaning up any memory it might own.

Friends

class NumberFormatterSettings< UnlocalizedNumberFormatter >
class NumberFormatterSettings< LocalizedNumberFormatter >
class UnlocalizedNumberFormatter

Detailed Description

A NumberFormatter that has a locale associated with it; this means .format() methods are available.

See also:
NumberFormatter
Draft:
This API may be changed in the future versions and was introduced in ICU 60

Definition at line 1780 of file numberformatter.h.


Constructor & Destructor Documentation

icu::number::LocalizedNumberFormatter::LocalizedNumberFormatter ( const LocalizedNumberFormatter other  )  [inline]

Returns a copy of this LocalizedNumberFormatter.

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

Definition at line 1830 of file numberformatter.h.

icu::number::LocalizedNumberFormatter::~LocalizedNumberFormatter (  ) 

Destruct this LocalizedNumberFormatter, cleaning up any memory it might own.

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

Member Function Documentation

FormattedNumber icu::number::LocalizedNumberFormatter::formatDecimal ( StringPiece  value,
UErrorCode status 
) const

Format the given decimal number to a string using the settings specified in the NumberFormatter fluent setting chain.

The syntax of the unformatted number is a "numeric string" as defined in the Decimal Arithmetic Specification, available at http://speleotrove.com/decimal

Parameters:
value The number to format.
status Set to an ErrorCode if one occurred in the setter chain or during formatting.
Returns:
A FormattedNumber object; call .toString() to get the string.
Draft:
This API may be changed in the future versions and was introduced in ICU 60
FormattedNumber icu::number::LocalizedNumberFormatter::formatDouble ( double  value,
UErrorCode status 
) const

Format the given float or double to a string using the settings specified in the NumberFormatter fluent setting chain.

Parameters:
value The number to format.
status Set to an ErrorCode if one occurred in the setter chain or during formatting.
Returns:
A FormattedNumber object; call .toString() to get the string.
Draft:
This API may be changed in the future versions and was introduced in ICU 60
FormattedNumber icu::number::LocalizedNumberFormatter::formatInt ( int64_t  value,
UErrorCode status 
) const

Format the given integer number to a string using the settings specified in the NumberFormatter fluent setting chain.

Parameters:
value The number to format.
status Set to an ErrorCode if one occurred in the setter chain or during formatting.
Returns:
A FormattedNumber object; call .toString() to get the string.
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:

Generated on 27 Mar 2018 for ICU 60.1 by  doxygen 1.6.1