Specifies formatting characteristics.
#include <locale.h>
struct lconv {
char * decimal_point;
char * thousands_sep;
char * grouping;
char * int_curr_symbol;
char * currency_symbol;
char * mon_decimal_point;
char * mon_thousands_sep;
char * mon_grouping;
char * positive_sign;
char * negative_sign;
char int_frac_digits;
char frac_digits;
char p_cs_precedes;
char p_sep_by_space;
char n_cs_precedes;
char n_sep_by_space;
char p_sign_posn;
char n_sign_posn;
char *int_curr_symbol;
char int_p_cs_precedes;
char int_n_cs_precedes;
char int_p_sep_by_space;
char int_n_sep_by_space;
char int_p_sign_posn;
char int_n_sign_posn;
};
decimal_point
Character string containing the non-monetary decimal point.
thousands_sep
Character string containing the non-monetary separator for digit grouping.
grouping
Non-monetary digit grouping sequence, encoded in a character string. Each character in the sequence is actually a number specifying the number of digits to group left of the decimal point. The null character, 0, specifies that the preceding group should be repeated. The number CHAR_MAX specifies that grouping is no longer required.
int_curr_symbol
Character string composed of a 3-character international currency symbol followed by separation character between the currency symbol and the currency number.
currency_symbol
Character string containing the local currency symbol.
mon_decimal_point
Character string containing the monetary decimal point.
mon_thousands_sep
Character string containing the monetary separator for digit grouping.
mon_grouping
Monetary digit grouping sequence. Uses same format as grouping.
positive_sign
Character string containing the sign for positive monetary numbers.
negative_sign
Character string containing the sign for negative monetary numbers.
int_frac_digits
Number of digits that may appear to the right of the decimal point for international monetary numbers.
frac_digits
Number of digits that may appear to the right of the decimal point for non-international monetary numbers.
p_cs_precedes
Contains 1 if currency_symbol should precede positive monetary numbers, 0 otherwise.
p_sep_by_space
Contains 1 if currency_symbol should be separated from positive monetary values by a space, 0 otherwise.
n_cs_precedes
Contains 1 if currency_symbol should precede negative monetary numbers, 0 otherwise.
n_sep_by_space
Contains 1 if currency_symbol should be separated from negative monetary values by a space, 0 otherwise.
p_sign_posn
Specifies how to use the positive_sign character string. Contains 0 when parentheses should surround the number and currency_symbol, 1 when the sign should precede the number and currency_symbol, 2 when the sign should follow the number and currency_symbol, 3 when the sign precedes currency_symbol, 4 when the sign follows currency_symbol.
n_sign_posn
Specifies how to use the negative_sign character string. Follows the same convention as p_sign_posn.
The lconv structure specifies numeric formatting requirements. Use localeconv() to retrieve a pointer to an lconv structure for the current locale.