These are the standard members of
struct lconv; there may be
".", and the value of
""(the empty string).
groupingapplies to non-monetary quantities and
mon_groupingapplies to monetary quantities. Use either
mon_thousands_septo separate the digit groups. Each member of these strings is to be interpreted as an integer value of type
char. Successive numbers (from left to right) give the sizes of successive groups (from right to left, starting at the decimal point.) The last member is either
0, in which case the previous member is used over and over again for all the remaining groups, or
CHAR_MAX, in which case there is no more grouping—or, put another way, any remaining digits form one large group without separators.
For example, if
"\04\03\02", the correct
grouping for the number
123456787654321 is ‘12’, ‘34’,
‘56’, ‘78’, ‘765’, ‘4321’. This uses a group of 4
digits at the end, preceded by a group of 3 digits, preceded by groups
of 2 digits (as many as needed). With a separator of ‘,’, the
number would be printed as ‘12,34,56,78,765,4321’.
A value of
"\03" indicates repeated groups of three digits, as
normally used in the U.S.
In the standard ‘C’ locale, both
mon_grouping have a value of
"". This value specifies no
grouping at all.
In the standard ‘C’ locale, both of these members have the value
CHAR_MAX, meaning “unspecified”. The ISO standard doesn't say
what to do when you find this value; we recommend printing no
fractional digits. (This locale also specifies the empty string for
mon_decimal_point, so printing any fractional digits would be