The struct lconv
contains numeric and monetary formatting rules as defined by a C locale. Objects of this struct may be obtained with localeconv. The members of lconv
are values of type char and of type char*. Each char* member except decimal_point
may be pointing at a null character (that is, at an empty C-string). The members of type char are all non-negative numbers, any of which may be CHAR_MAX if the corresponding value is not available in the current C locale.
char int_p_cs_precedes
(C99)
1 if int_curr_symbol is placed before non-negative international monetary value, â0â if afterchar int_n_cs_precedes
(C99)
1 if int_curr_symbol is placed before negative international monetary value, â0â if afterchar int_p_sep_by_space
(C99)
indicates the separation of int_curr_symbol, positive_sign, and the non-negative international monetary valuechar int_n_sep_by_space
(C99)
indicates the separation of int_curr_symbol, negative_sign, and the negative international monetary valuechar int_p_sign_posn
(C99)
indicates the position of positive_sign in a non-negative international monetary valuechar int_n_sign_posn
(C99)
indicates the position of negative_sign in a negative international monetary valueThe characters of the C-strings pointed to by grouping and mon_grouping are interpreted according to their numeric values. When the terminating '\0' is encountered, the last value seen is assumed to repeat for the remainder of digits. If CHAR_MAX is encountered, no further digits are grouped. The typical grouping of three digits at a time is "\003".
The values of p_sep_by_space, n_sep_by_space, int_p_sep_by_space, int_n_sep_by_space are interpreted as follows:
â0â no space separates the currency symbol and the value 1 sign sticks to the currency symbol, value is separated by a space 2 sign sticks to the value. Currency symbol is separated by a spaceThe values of p_sign_posn, n_sign_posn, int_p_sign_posn, int_n_sign_posn are interpreted as follows:
â0â parentheses around the value and the currency symbol are used to represent the sign 1 sign before the value and the currency symbol 2 sign after the value and the currency symbol 3 sign before the currency symbol 4 sign after the currency symbol [edit] Example#include <locale.h> #include <stdio.h> int main(void) { setlocale(LC_ALL, "ja_JP.UTF-8"); struct lconv* lc = localeconv(); printf("Japanese currency symbol: %s(%s)\n", lc->currency_symbol, lc->int_curr_symbol); }
Possible output:
Japanese currency symbol: ï¿¥(JPY )[edit] References
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4