32 #if U_SHOW_CPLUSPLUS_API
34 #if !UCONFIG_NO_FORMATTING
173 #ifndef U_HIDE_INTERNAL_API
180 kFormatSymbolCount = kExponentMultiplicationSymbol + 2
285 inline UnicodeString getSymbol(ENumberFormatSymbol symbol)
const;
299 void setSymbol(ENumberFormatSymbol symbol,
const UnicodeString &value,
const UBool propagateDigits);
301 #ifndef U_HIDE_INTERNAL_API
316 inline Locale getLocale()
const;
342 UBool beforeCurrency,
355 UBool beforeCurrency,
397 #ifndef U_HIDE_INTERNAL_API
402 return fIsCustomCurrencySymbol;
409 return fIsCustomIntlCurrencySymbol;
416 return fCodePointZero;
435 inline const UnicodeString& getConstSymbol(ENumberFormatSymbol symbol)
const;
437 #ifndef U_HIDE_INTERNAL_API
453 inline const UnicodeString& getConstDigitSymbol(int32_t digit)
const;
459 inline const char16_t* getCurrencyPattern()
const;
465 inline const char* getNumberingSystemName()
const;
508 CharString* actualLocale =
nullptr;
509 CharString* validLocale =
nullptr;
510 const char16_t* currPattern =
nullptr;
514 UBool fIsCustomCurrencySymbol;
515 UBool fIsCustomIntlCurrencySymbol;
524 if(symbol < kFormatSymbolCount) {
525 strPtr = &fSymbols[symbol];
536 if(symbol < kFormatSymbolCount) {
537 strPtr = &fSymbols[symbol];
544 #ifndef U_HIDE_INTERNAL_API
545 inline const UnicodeString& DecimalFormatSymbols::getConstDigitSymbol(int32_t digit)
const {
546 if (digit < 0 || digit > 9) {
550 return fSymbols[kZeroDigitSymbol];
553 return fSymbols[key];
561 if (symbol == kCurrencySymbol) {
562 fIsCustomCurrencySymbol =
true;
564 else if (symbol == kIntlCurrencySymbol) {
565 fIsCustomIntlCurrencySymbol =
true;
567 if(symbol<kFormatSymbolCount) {
568 fSymbols[symbol]=value;
574 if (symbol == kZeroDigitSymbol) {
577 fCodePointZero = sym;
578 for ( int8_t i = 1 ; i<= 9 ; i++ ) {
580 fSymbols[
static_cast<int>(kOneDigitSymbol) + i - 1] =
UnicodeString(sym);
585 }
else if (symbol >= kOneDigitSymbol && symbol <= kNineDigitSymbol) {
593 DecimalFormatSymbols::getLocale()
const {
597 #ifndef U_HIDE_INTERNAL_API
598 inline const char16_t*
599 DecimalFormatSymbols::getCurrencyPattern()
const {
603 DecimalFormatSymbols::getNumberingSystemName()
const {
A Locale object represents a specific geographical, political, or cultural region.
Defines numbering systems.
UObject is the common ICU "boilerplate" class.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
UChar32 char32At(int32_t offset) const
Return the code point that contains the code unit at offset offset.
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.
C++ API: Locale ID object.
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
constexpr const size_t kInternalNumSysNameCapacity
Size of a numbering system name.
C++ API: NumberingSystem object.
C API: Unicode Properties.
U_CAPI int32_t u_charDigitValue(UChar32 c)
Returns the decimal digit value of a decimal digit character.
ULocDataLocaleType
Constants for *_getLocale() Allow user to select whether she wants information on requested,...
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
int8_t UBool
The ICU boolean type, a signed-byte integer.
C API: Compatibility APIs for number formatting.
UCurrencySpacing
Constants for specifying currency spacing.
@ UNUM_CURRENCY_SPACING_COUNT
One more than the highest normal UCurrencySpacing value.
C++ API: Common ICU base class UObject.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.