Go to the documentation of this file.
33 #if !UCONFIG_NO_FORMATTING
171 kFormatSymbolCount = kNineDigitSymbol + 2
184 #ifndef U_HIDE_DRAFT_API
278 inline UnicodeString getSymbol(ENumberFormatSymbol symbol)
const;
292 void setSymbol(ENumberFormatSymbol symbol,
const UnicodeString &value,
const UBool propogateDigits);
298 inline Locale getLocale()
const;
324 UBool beforeCurrency,
337 UBool beforeCurrency,
352 static UClassID U_EXPORT2 getStaticClassID();
377 void setCurrencyForSymbols();
381 #ifndef U_HIDE_INTERNAL_API
386 return fIsCustomCurrencySymbol;
393 return fIsCustomIntlCurrencySymbol;
400 return fCodePointZero;
419 inline const UnicodeString& getConstSymbol(ENumberFormatSymbol symbol)
const;
421 #ifndef U_HIDE_INTERNAL_API
437 inline const UnicodeString& getConstDigitSymbol(int32_t digit)
const;
443 inline const char16_t* getCurrencyPattern(
void)
const;
490 const char16_t* currPattern;
494 UBool fIsCustomCurrencySymbol;
495 UBool fIsCustomIntlCurrencySymbol;
503 if(symbol < kFormatSymbolCount) {
504 strPtr = &fSymbols[symbol];
515 if(symbol < kFormatSymbolCount) {
516 strPtr = &fSymbols[symbol];
523 #ifndef U_HIDE_INTERNAL_API
524 inline const UnicodeString& DecimalFormatSymbols::getConstDigitSymbol(int32_t digit)
const {
525 if (digit < 0 || digit > 9) {
529 return fSymbols[kZeroDigitSymbol];
532 return fSymbols[key];
540 if (symbol == kCurrencySymbol) {
541 fIsCustomCurrencySymbol =
TRUE;
543 else if (symbol == kIntlCurrencySymbol) {
544 fIsCustomIntlCurrencySymbol =
TRUE;
546 if(symbol<kFormatSymbolCount) {
547 fSymbols[symbol]=value;
553 if (symbol == kZeroDigitSymbol) {
556 fCodePointZero = sym;
557 for ( int8_t i = 1 ; i<= 9 ; i++ ) {
564 }
else if (symbol >= kOneDigitSymbol && symbol <= kNineDigitSymbol) {
572 DecimalFormatSymbols::getLocale()
const {
576 #ifndef U_HIDE_INTERNAL_API
577 inline const char16_t*
578 DecimalFormatSymbols::getCurrencyPattern()
const {
#define FALSE
The FALSE value of a UBool.
Basic definitions for ICU, for both C and C++ APIs.
@ UNUM_CURRENCY_SPACING_COUNT
One more than the highest normal UCurrencySpacing value.
int8_t UBool
The ICU boolean type.
ULocDataLocaleType
Constants for *_getLocale() Allow user to select whether she wants information on requested,...
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
UChar32 char32At(int32_t offset) const
Return the code point that contains the code unit at offset offset.
C API: Compatibility APIs for number formatting.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
UObject is the common ICU "boilerplate" class.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
virtual UClassID getDynamicClassID() const
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
#define TRUE
The TRUE value of a UBool.
UCurrencySpacing
Constants for specifying currency spacing.
C++ API: NumberingSystem object.
#define ULOC_FULLNAME_CAPACITY
Useful constant for the maximum size of the whole locale ID (including the terminating NULL and all k...
int32_t countChar32(int32_t start=0, int32_t length=INT32_MAX) const
Count Unicode code points in the length char16_t code units of the string.
Defines numbering systems.
C API: Unicode Properties.
int32_t u_charDigitValue(UChar32 c)
Returns the decimal digit value of a decimal digit character.
C++ API: Locale ID object.
C++ API: Common ICU base class UObject.
#define U_NAMESPACE_BEGIN
A Locale object represents a specific geographical, political, or cultural region.