17 #if !UCONFIG_NO_FORMATTING
202 UNUM_PAD_BEFORE_PREFIX,
203 UNUM_PAD_AFTER_PREFIX,
204 UNUM_PAD_BEFORE_SUFFIX,
205 UNUM_PAD_AFTER_SUFFIX
241 const UChar* pattern,
504 const UChar *pattern,
738 const UChar* newValue,
760 UBool isPatternLocalized,
void unum_setDoubleAttribute(UNumberFormat *fmt, UNumberFormatAttribute attr, double newValue)
Set a numeric attribute associated with a UNumberFormat.
void unum_setSymbol(UNumberFormat *fmt, UNumberFormatSymbol symbol, const UChar *value, int32_t length, UErrorCode *status)
Set a symbol associated with a UNumberFormat.
UNumberFormatRoundingMode
The possible number format rounding modes.
double unum_getDoubleAttribute(const UNumberFormat *fmt, UNumberFormatAttribute attr)
Get a numeric attribute associated with a UNumberFormat.
The monetary grouping separator.
Numbering system rule-based format.
const char * unum_getAvailable(int32_t localeIndex)
Get a locale for which decimal formatting patterns are available.
void unum_applyPattern(UNumberFormat *format, UBool localized, const UChar *pattern, int32_t patternLength, UParseError *parseError, UErrorCode *status)
Set the pattern used by a UNumberFormat.
Significant digit symbol.
Rule-based format defined by pattern.
Lenient parse mode used by rule-based formats.
double unum_parseDoubleCurrency(const UNumberFormat *fmt, const UChar *text, int32_t textLength, int32_t *parsePos, UChar *currency, UErrorCode *status)
Parse a string into a double and a currency using a UNumberFormat.
int32_t unum_formatInt64(const UNumberFormat *fmt, int64_t number, UChar *result, int32_t resultLength, UFieldPosition *pos, UErrorCode *status)
Format an int64 using a UNumberFormat.
int32_t unum_format(const UNumberFormat *fmt, int32_t number, UChar *result, int32_t resultLength, UFieldPosition *pos, UErrorCode *status)
Format an integer using a UNumberFormat.
UNumberFormatSymbol
Constants for specifying a number format symbol.
Half-even rounding, misspelled name.
int64_t unum_parseInt64(const UNumberFormat *fmt, const UChar *text, int32_t textLength, int32_t *parsePos, UErrorCode *status)
Parse a string into an int64 using a UNumberFormat.
Decimal format defined by pattern.
The position at which padding will take place.
Spellout rule-based format.
int32_t unum_getTextAttribute(const UNumberFormat *fmt, UNumberFormatTextAttribute tag, UChar *result, int32_t resultLength, UErrorCode *status)
Get a text attribute associated with a UNumberFormat.
UNumberFormatStyle
The possible number format styles.
int32_t unum_countAvailable(void)
Determine how many locales have decimal formatting patterns available.
void * UNumberFormat
A number formatter.
A struct representing a range of text containing a specific field.
Maximum significant digits.
UNumberFormatTextAttribute
The possible UNumberFormat text attributes.
UNumberFormat * unum_clone(const UNumberFormat *fmt, UErrorCode *status)
Open a copy of a UNumberFormat.
The width to which the output of format() is padded.
(Alias for UNUM_PATTERN_DECIMAL)
UNumberFormatPadPosition
The possible number format pad positions.
int32_t unum_formatDouble(const UNumberFormat *fmt, double number, UChar *result, int32_t resultLength, UFieldPosition *pos, UErrorCode *status)
Format a double using a UNumberFormat.
uint16_t UChar
Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned.
const char * unum_getLocaleByType(const UNumberFormat *fmt, ULocDataLocaleType type, UErrorCode *status)
Get the locale for this number format object.
Ordinal rule-based format.
Escape padding character.
C API: Parse Error Information.
void unum_setAttribute(UNumberFormat *fmt, UNumberFormatAttribute attr, int32_t newValue)
Set a numeric attribute associated with a UNumberFormat.
The character used to pad to the format width.
UNumberFormat * unum_open(UNumberFormatStyle style, const UChar *pattern, int32_t patternLength, const char *locale, UParseError *parseErr, UErrorCode *status)
Create and return a new UNumberFormat for formatting and parsing numbers.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
ULocDataLocaleType
Constants for *_getLocale() Allow user to select whether she wants information on requested...
double unum_parseDouble(const UNumberFormat *fmt, const UChar *text, int32_t textLength, int32_t *parsePos, UErrorCode *status)
Parse a string into a double using a UNumberFormat.
int32_t unum_getSymbol(const UNumberFormat *fmt, UNumberFormatSymbol symbol, UChar *buffer, int32_t size, UErrorCode *status)
Get a symbol associated with a UNumberFormat.
signed long long int64_t
Define 64 bit limits.
Minimum significant digits.
A UParseError struct is used to returned detailed information about parsing errors.
int32_t unum_formatDoubleCurrency(const UNumberFormat *fmt, double number, UChar *currency, UChar *result, int32_t resultLength, UFieldPosition *pos, UErrorCode *status)
Format a double currency amount using a UNumberFormat.
Basic definitions for ICU, for both C and C++ APIs.
The international currency symbol.
int32_t unum_getAttribute(const UNumberFormat *fmt, UNumberFormatAttribute attr)
Get a numeric attribute associated with a UNumberFormat.
int32_t unum_toPattern(const UNumberFormat *fmt, UBool isPatternLocalized, UChar *result, int32_t resultLength, UErrorCode *status)
Extract the pattern from a UNumberFormat.
Duration rule-based format.
UNumberFormatAttribute
The possible UNumberFormat numeric attributes.
void unum_close(UNumberFormat *fmt)
Close a UNumberFormat.
signed int int32_t
Define 64 bit limits.
int32_t unum_parse(const UNumberFormat *fmt, const UChar *text, int32_t textLength, int32_t *parsePos, UErrorCode *status)
Parse a string into an integer using a UNumberFormat.
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
int8_t UBool
The ICU boolean type.
Character representing a digit in the pattern.
Always show decimal point.
void unum_setTextAttribute(UNumberFormat *fmt, UNumberFormatTextAttribute tag, const UChar *newValue, int32_t newValueLength, UErrorCode *status)
Set a text attribute associated with a UNumberFormat.