std::numpunct_byname
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 <locale>
|
||
template< class charT > class numpunct_byname : public std::numpunct<charT>; |
||
std::numpunct_byname es una faceta std::numpunct que encapsula las preferencias numéricos de puntuación de una configuración regional especificada en su construcción .
Original:
std::numpunct_byname is a std::numpunct facet which encapsulates numeric punctuation preferences of a locale specified at its construction.
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.
Dos especializaciones son proporcionados por la biblioteca estándar
Original:
Two specializations are provided by the standard library
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.
Definido en el archivo de encabezado
<locale> | |
std::numpunct_byname<char>
|
específico de entorno nacional faceta std::numpunct carácter estrecho para I / O
Original: locale-specific std::numpunct facet for narrow character I/O The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
std::numpunct_byname<wchar_t>
|
específico de entorno nacional faceta std::numpunct para caracteres anchos I / O
Original: locale-specific std::numpunct facet for wide characters I/O The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Tipos de miembros
Miembro de tipo
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
char_type
|
charT
|
string_type
|
std::basic_string<charT>
|
Las funciones miembro
construye una nueva faceta numpunct_byname Original: constructs a new numpunct_byname facet The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro pública) | |
destructs una faceta numpunct_byname Original: destructs a numpunct_byname facet The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro protegida) |
Ejemplo
Este ejemplo demonistrates cómo aplicar reglas de puntuación numérico de otro idioma, sin modificar el resto de la configuración regional .
Original:
This example demonistrates how to apply numeric punctuation rules of another language without changing the rest of the 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.
Ejecuta este código
#include <iostream>
#include <locale>
int main()
{
const double number = 1000.25;
std::wcout << L"default locale: " << number << L'\n';
std::wcout.imbue(std::locale(std::wcout.getloc(),
new std::numpunct_byname<wchar_t>("ru_RU.UTF8")));
std::wcout << L"default locale with russian numpunct: " << number << L'\n';
}
Salida:
default locale: 1000.25
default locale with russian numpunct: 1 000,25
Ver también
define las reglas numéricas de puntuación Original: defines numeric punctuation rules The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (plantilla de clase) |