std::lconv - cppreference.com
De cppreference.com
<metanoindex/>
<tbody> </tbody>
| Definido no cabeçalho <clocale> |
||
|
|
||
O std::lconv classe contém regras de formatação numéricos e monetários, definida como uma localidade C. Objetos desta estrutura pode ser obtida com std::localeconv. Os membros do std::lconv são valores de char tipo e de char* tipo. Cada membro char* exceto decimal_point pode estar apontando para um caractere nulo (isto é, a um vazio C-corda). Os membros do tipo char são todos números não negativos, qualquer das quais pode ser CHAR_MAX se o valor correspondente não está disponível no local C actual.
Original:
The class std::lconv contains numeric and monetary formatting rules as defined by a C locale. Objects of this struct may be obtained with std::localeconv. The members of std::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.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Objetos Membros
Não monetários numéricos parâmetros de formatação
char* decimal_point |
o caractere usado como ponto decimal Original: the character used as the decimal point The text has been machine-translated via Google Translate. (objeto membro público) |
char* thousands_sep |
o caractere usado para separar grupos de dígitos antes do ponto decimal Original: the character used to separate groups of digits before the decimal point The text has been machine-translated via Google Translate. (objeto membro público) |
char* grouping |
uma seqüência cujos elementos indicam os tamanhos dos grupos de dígitos Original: a string whose elements indicate the sizes of digit groups The text has been machine-translated via Google Translate. (objeto membro público) |
Monetárias parâmetros de formatação numéricas
char* mon_decimal_point |
o caractere usado como ponto decimal Original: the character used as the decimal point The text has been machine-translated via Google Translate. (objeto membro público) |
char* mon_thousands_sep |
o caractere usado para separar grupos de dígitos antes do ponto decimal Original: the character used to separate groups of digits before the decimal point The text has been machine-translated via Google Translate. (objeto membro público) |
char* mon_grouping |
uma seqüência cujos elementos indicam os tamanhos dos grupos de dígitos Original: a string whose elements indicate the sizes of digit groups The text has been machine-translated via Google Translate. (objeto membro público) |
char* positive_sign |
uma seqüência usada para indicar não negativo quantidade monetária Original: a string used to indicate non-negative monetary quantity The text has been machine-translated via Google Translate. (objeto membro público) |
char* negative_sign |
uma corda usada para indicar a quantidade monetária negativa Original: a string used to indicate negative monetary quantity The text has been machine-translated via Google Translate. (objeto membro público) |
Monetárias locais parâmetros de formatação numéricas
char* currency_symbol |
o símbolo usado para a moeda corrente na localidade C atual Original: the symbol used for currency in the current C locale The text has been machine-translated via Google Translate. (objeto membro público) |
char frac_digits |
o número de dígitos depois do ponto decimal para exibir em uma quantidade monetária Original: the number of digits after the decimal point to display in a monetary quantity The text has been machine-translated via Google Translate. (objeto membro público) |
char p_cs_precedes |
Original:
The text has been machine-translated via Google Translate. (objeto membro público) |
char n_cs_precedes |
Original:
The text has been machine-translated via Google Translate. (objeto membro público) |
char p_sep_by_space |
indica a separação do Original: indicates the separation of The text has been machine-translated via Google Translate. (objeto membro público) |
char n_sep_by_space |
indica a separação do Original: indicates the separation of The text has been machine-translated via Google Translate. (objeto membro público) |
char p_sign_posn |
indica a posição de Original: indicates the position of The text has been machine-translated via Google Translate. (objeto membro público) |
char n_sign_posn |
indica a posição de Original: indicates the position of The text has been machine-translated via Google Translate. (objeto membro público) |
Internacionais formatação monetários parâmetros numéricos
char* int_curr_symbol |
a corda usada como nome da moeda internacional na localidade C atual Original: the string used as international currency name in the current C locale The text has been machine-translated via Google Translate. (objeto membro público) |
char int_frac_digits |
o número de dígitos depois do ponto decimal para exibir em uma quantidade monetário internacional Original: the number of digits after the decimal point to display in an international monetary quantity The text has been machine-translated via Google Translate. (objeto membro público) |
char int_p_cs_precedes |
Original:
The text has been machine-translated via Google Translate. (objeto membro público) |
char int_n_cs_precedes |
Original:
The text has been machine-translated via Google Translate. (objeto membro público) |
char int_p_sep_by_space |
indica a separação de Original: indicates the separation of The text has been machine-translated via Google Translate. (objeto membro público) |
char int_n_sep_by_space |
indica a separação do Original: indicates the separation of The text has been machine-translated via Google Translate. (objeto membro público) |
char int_p_sign_posn |
indica a posição do Original: indicates the position of The text has been machine-translated via Google Translate. (objeto membro público) |
char int_n_sign_posn |
indica a posição de um valor no Original: indicates the position of The text has been machine-translated via Google Translate. (objeto membro público) |
Os personagens do C-cordas apontado por grouping e mon_grouping são interpretados de acordo com seus valores numéricos. Quando o '\0' terminação é encontrado, o último valor observado é assumido para repetir pelo restante de dígitos. Se CHAR_MAX é encontrado, não dígitos adicionais são agrupadas. o agrupamento típico de três dígitos de cada vez é "\003".
Original:
The 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 text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Os valores de p_sep_by_space, n_sep_by_space, int_p_sep_by_space, int_n_sep_by_space são interpretados da seguinte forma:
Original:
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:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
| 0 | nenhum espaço separa o símbolo da moeda eo valor Original: no space separates the currency symbol and the value The text has been machine-translated via Google Translate. |
| 1 | assinar varas para o símbolo da moeda, o valor é separado por um espaço Original: sign sticks to the currency symbol, value is separated by a space The text has been machine-translated via Google Translate. |
| 2 | assinar varas para o valor. Símbolo da moeda é separado por um espaço Original: sign sticks to the value. Currency symbol is separated by a space The text has been machine-translated via Google Translate. |
Os valores de p_sign_posn, n_sign_posn, int_p_sign_posn, int_n_sign_posn são interpretados da seguinte forma:
Original:
The values of p_sign_posn, n_sign_posn, int_p_sign_posn, int_n_sign_posn are interpreted as follows:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
| 0 | parênteses o valor eo símbolo da moeda são usados para representar o sinal Original: parentheses around the value and the currency symbol are used to represent the sign The text has been machine-translated via Google Translate. |
| 1 | assinar antes o valor eo símbolo de moeda Original: sign before the value and the currency symbol The text has been machine-translated via Google Translate. |
| 2 | assinar depois o valor eo símbolo de moeda Original: sign after the value and the currency symbol The text has been machine-translated via Google Translate. |
| 3 | assinar antes do símbolo de moeda Original: sign before the currency symbol The text has been machine-translated via Google Translate. |
| 4 | assinar depois o símbolo da moeda Original: sign after the currency symbol The text has been machine-translated via Google Translate. |
Exemplo
#include <clocale> #include <iostream> int main() { std::setlocale(LC_ALL, "ja_JP.UTF-8"); std::lconv* lc = std::localeconv(); std::cout << "Japanese currency symbol: " << lc->currency_symbol << '(' << lc->int_curr_symbol << ")\n"; }
Saída:
Japanese currency symbol: ¥(JPY )
Veja também
consulta os detalhes da formatação numéricos e monetários do local atual Original: queries numeric and monetary formatting details of the current locale The text has been machine-translated via Google Translate. (função) [edit] | |
define as regras de pontuação numéricos Original: defines numeric punctuation rules The text has been machine-translated via Google Translate. (modelo de classe) [edit] | |
define parâmetros de formatação monetários utilizados por std::money_get e std::money_put Original: defines monetary formatting parameters used by std::money_get and std::money_put The text has been machine-translated via Google Translate. (modelo de classe) [edit] | |
Documentação C para lconv | |