std::lconv
De cppreference.com
|
|
Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate.
La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
| Definido en el archivo de encabezado <clocale>
|
||
struct lconv; |
||
El
std::lconv clase contiene las reglas de formato numérico y monetaria según la definición de un entorno nacional C. Los objetos de esta estructura puede ser obtenida con std::localeconv. Los miembros de std::lconv son valores de char tipo y de char* tipo. Cada miembro char* excepto decimal_point puede estar apuntando a un carácter nulo (es decir, en un C-string). Los miembros de tipo char son todos los números no negativos, cualquiera de los cuales puede ser CHAR_MAX si el valor correspondiente no está disponible en la actual configuración regional C .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.
You can help to correct and verify the translation. Click here for instructions.
Objetos miembros
Las partidas no monetarias parámetros de formato numérico
char* decimal_point |
el carácter utilizado como separador decimal Original: the character used as the decimal point The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
char* thousands_sep |
el carácter utilizado para separar grupos de dígitos antes del punto decimal Original: the character used to separate groups of digits before the decimal point The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
char* grouping |
una cadena cuyos elementos indican los tamaños de los grupos de dígitos Original: a string whose elements indicate the sizes of digit groups The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
Monetarias parámetros de formato numérico
char* mon_decimal_point |
el carácter utilizado como separador decimal Original: the character used as the decimal point The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
char* mon_thousands_sep |
el carácter utilizado para separar grupos de dígitos antes del punto decimal Original: the character used to separate groups of digits before the decimal point The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
char* mon_grouping |
una cadena cuyos elementos indican los tamaños de los grupos de dígitos Original: a string whose elements indicate the sizes of digit groups The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
char* positive_sign |
una cadena que se utiliza para indicar que no negativo cantidad monetaria Original: a string used to indicate non-negative monetary quantity The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
char* negative_sign |
una cadena que se utiliza para indicar la cantidad monetaria negativa Original: a string used to indicate negative monetary quantity The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
Locales parámetros de formato monetario numéricos
char* currency_symbol |
el símbolo que se utiliza para la moneda en el actual entorno nacional C Original: the symbol used for currency 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. (objeto miembro público) |
char frac_digits |
el número de dígitos después del punto decimal que se mostrará en una cantidad monetaria Original: the number of digits after the decimal point to display in a monetary quantity The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
char p_cs_precedes |
1 si currency_symbol se coloca delante de valor no negativo, si después de 0Original: 1 if currency_symbol is placed before non-negative value, 0 if afterThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
char n_cs_precedes |
1 si currency_symbol se coloca delante de valor negativo, si después de 0Original: 1 if currency_symbol is placed before negative value, 0 if afterThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
char p_sep_by_space |
indica la separación de currency_symbol, positive_sign, y el valor monetario no negativoOriginal: indicates the separation of currency_symbol, positive_sign, and the non-negative monetary valueThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
char n_sep_by_space |
indica la separación de currency_symbol, negative_sign, y el valor monetario negativoOriginal: indicates the separation of currency_symbol, negative_sign, and the negative monetary valueThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
char p_sign_posn |
indica la posición de positive_sign en un valor monetario no negativoOriginal: indicates the position of positive_sign in a non-negative monetary valueThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
char n_sign_posn |
indica la posición de negative_sign en un valor monetario negativoOriginal: indicates the position of negative_sign in a negative monetary valueThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
Monetarias internacionales numéricos parámetros de formato
char* int_curr_symbol |
la cadena que se utiliza como nombre de la moneda internacional en el actual entorno nacional C Original: the string used as international currency name 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. (objeto miembro público) |
char int_frac_digits |
el número de dígitos después del punto decimal que se mostrará en una cantidad monetaria 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. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
char int_p_cs_precedes |
1 si currency_symbol se coloca antes no negativo valor monetario internacional, si después de 0Original: 1 if currency_symbol is placed before non-negative international monetary value, 0 if afterThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
char int_n_cs_precedes |
1 si currency_symbol se coloca antes negativo valor monetario internacional, si después de 0Original: 1 if currency_symbol is placed before negative international monetary value, 0 if afterThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
char int_p_sep_by_space |
indica la separación de currency_symbol, positive_sign, y el no negativo valor monetario internacionalOriginal: indicates the separation of currency_symbol, positive_sign, and the non-negative international monetary valueThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
char int_n_sep_by_space |
indica la separación de currency_symbol, negative_sign, y el negativo valor monetario internacionalOriginal: indicates the separation of currency_symbol, negative_sign, and the negative international monetary valueThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
char int_p_sign_posn |
indica la posición de positive_sign en un valor no negativo monetario internacionalOriginal: indicates the position of positive_sign in a non-negative international monetary valueThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
char int_n_sign_posn |
indica la posición de negative_sign en un negativo valor monetario internacionalOriginal: indicates the position of negative_sign in a negative international monetary valueThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (objeto miembro público) |
Los personajes de las series C-apuntada por
grouping mon_grouping y se interpretan de acuerdo con sus valores numéricos. Cuando el '\0' de terminación se encuentra, visto el último valor se supone que repetir para el resto de los dígitos. Si CHAR_MAX se encuentra, sin dígitos adicionales se agrupan. la agrupación típica de tres dígitos a la vez es "\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.
You can help to correct and verify the translation. Click here for instructions.
Los valores de
p_sep_by_space, n_sep_by_space, int_p_sep_by_space, int_n_sep_by_space se interpretan de la siguiente manera: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.
You can help to correct and verify the translation. Click here for instructions.
| 0 | hay espacio separa el símbolo monetario y el valor
Original: no space separates the currency symbol and the value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| 1 | firmar palos para el símbolo de divisa, valor está separado por un espacio
Original: sign sticks to the currency symbol, value is separated by a space The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| 2 | firmar palos para el valor. Símbolo de moneda está separado por un espacio
Original: sign sticks to the value. Currency symbol is separated by a space The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Los valores de
p_sign_posn, n_sign_posn, int_p_sign_posn, int_n_sign_posn se interpretan de la siguiente manera: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.
You can help to correct and verify the translation. Click here for instructions.
| 0 | paréntesis el valor y el símbolo de moneda se utilizan para representar el signo
Original: parentheses around the value and the currency symbol are used to represent the sign The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| 1 | antes de firmar el valor y el símbolo de moneda
Original: sign before the value and the currency symbol The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| 2 | después de firmar el valor y el símbolo de moneda
Original: sign after the value and the currency symbol The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| 3 | antes de firmar el símbolo de moneda
Original: sign before the currency symbol The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| 4 | después de firmar el símbolo de moneda
Original: sign after the currency symbol The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Ejemplo
Ejecuta este código
#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";
}
Salida:
Japanese currency symbol: ¥(JPY )
Ver también
| Consulta detalles de formato numérico y monetario de la configuración regional actual. (función) | |
| Define las reglas numéricas de puntuación. (plantilla de clase) | |
| Define los parámetros de formato monetario utilizados por std::money_get y std::money_put. (plantilla de clase) | |
Documentación de C para lconv
| |