Use 0
to indicate that the formatter should use placeholder 0's: eg. 'CHF #,###.00'
formats 0.3
as 'CHF 0.30'
.
The ,
tells the formatter how to handle large number groupings. The ICU pattern recognizes two uses of the ,
: the first instance to the left of the decimal separator (.
) is used for the smallest grouping. If there is a second ,
to the left of the first, that is used to separate large groupings. If only one is present, it is used for all groupings. Examples:
'#,###' formats 12345 as '12,345' and 123456789 as '123,456,789'
'#,##,###' formats 12345 as '12,345' and 123456789 as '12,34,56,789'
'#,###,##' formats 12345 as '123,45' and 123456789 as '1,234,567,89'
The actual separator character used depends on locale (so '123,456,789'
might be '123.456.789'
in some European formats).