Standard C++ Library Reference ISO/IEC (VERSION3)
char n_sep_by_space; CHAR_MAX LC_MONETARY
char n_sign_posn; CHAR_MAX LC_MONETARY
char p_cs_precedes; CHAR_MAX LC_MONETARY
char p_sep_by_space; CHAR_MAX LC_MONETARY
char p_sign_posn; CHAR_MAX LC_MONETARY
char *int_curr_symbol; "" LC_MONETARY
char int_frac_digits; CHAR_MAX LC_MONETARY
char int_n_cs_precedes; CHAR_MAX LC_MONETARY
char int_n_sep_by_space; CHAR_MAX LC_MONETARY
char int_n_sign_posn; CHAR_MAX LC_MONETARY
char int_p_cs_precedes; CHAR_MAX LC_MONETARY
char int_p_sep_by_space; CHAR_MAX LC_MONETARY
char int_p_sign_posn; CHAR_MAX LC_MONETARY
};
struct lconv contains members that describe how to format numeric and monetary values.
Functions in the Standard C library use only the field decimal_point. The information is
otherwise advisory:
Members of type pointer to char all point to C strings.●
Members of type char have nonnegative values.●
A char value of CHAR_MAX indicates that a meaningful value is not available in the
current locale.
●
The members shown above can occur in arbitrary order and can be interspersed with additional
members. The comment following each member shows its value for the "C" locale, the locale
in effect at program startup, followed by the locale category that can affect its value.
A description of each member follows, with an example in parentheses that would be suitable
for a USA locale.
currency_symbol -- the local currency symbol ("$")
decimal_point -- the decimal point for non-monetary values (".")
grouping -- the sizes of digit groups for non-monetary values. Successive elements of the
string describe groups going away from the decimal point:
An element value of zero (the terminating null character) calls for the previous element
value to be repeated indefinitely.
●
An element value of CHAR_MAX ends any further grouping (and hence ends the string).●
Thus, the array {3, 2, CHAR_MAX} calls for a group of three digits, then two, then whatever
remains, as in 9876,54,321, while "\3" calls for repeated groups of three digits, as in
987,654,321. ("\3")
int_curr_symbol -- the international currency symbol specified by ISO 4217 ("USD ")