![]()
This function will add tier2 currency support. Be default, only tier1
(most popular currencies) are supported. If an application really needs
to support some of the rarely used currencies, it should call this function
before any other functions in this namespace.
|
code » | |
Modify currency pattern string by adjusting precision for given currency.
Standard currency pattern will have 2 digit after decimal point.
Examples:
$#,##0.00 -> $#,##0 (precision == 0)
$#,##0.00 -> $#,##0.0 (precision == 1)
$#,##0.00 -> $#,##0.000 (precision == 3)
|
code » | |
This function constructs the currency pattern. Currency sign is provided. The
pattern information is encoded in patternNum.
|
code » | |
Global currency pattern always uses ISO-4217 currency code as prefix. Local
currency sign is added if it is different from currency code. Each currency
is unique in this form. The negative side is that ISO code looks weird in
some countries as people normally do not use it. Local currency sign
alleviates the problem, but also makes it a little verbose.
|
code » | |
Return global currency sign string for those applications
that want to handle currency sign themselves.
|
code » | |
Local currency pattern is the most frequently used pattern in currency's
native region. It does not care about how it is distinguished from other
currencies.
|
code » | |
Returns local currency sign string for those applications that need to
handle currency sign separately.
|
code » | |
Portable currency pattern is a compromise between local and global. It is
not a mere blend or mid-way between the two. Currency sign is chosen so that
it looks familiar to native users. It also has enough information to
distinguish itself from other popular currencies in its native region.
In this pattern, currency sign symbols that has availability problem in
popular fonts are also avoided.
|
code » | |
Return portable currency sign string for those applications that need to
handle currency sign themselves.
|
code » | |
This function returns the default currency sign position. Some applications
may want to handle currency sign and currency amount separately. This
function can be used in such situations to correctly position the currency
sign relative to the amount.
To match the behavior of ICU, position is not determined by display locale.
|
code » |
![]()
Tier 1 currency information.
The first number in the array is a combination of the precision mask and
other flags. The precision mask indicates how many decimal places to show for
the currency. Valid values are [0..7]. The position flag indicates whether
the currency sign should be positioned after the number. Valid values are 0
(before the number) or 16 (after the number). The space flag indicates
whether a space should be inserted between the currency sign and number.
Valid values are 0 (no space) and 32 (space).
The number in the array is calculated by adding together the mask and flag
values. For example:
0: no precision (0), currency sign first (0), no space (0)
2: two decimals precision (2), currency sign first (0), no space (0)
18: two decimals precision (2), currency sign last (16), no space (0)
50: two decimals precision (2), currency sign last (16), space (32)
|
Code » | |
![]()
Tier 2 currency information.
|
Code » | |
![]()
Whether the currency sign should be positioned after the number.
|
Code » | |
![]()
The mask of precision field.
|
Code » | |
![]()
Whether a space should be inserted between the number and currency sign.
|
Code » |