std::numpunct_byname
Da cppreference.com.
|
|
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
<metanoindex/>
<tbody> </tbody>| Elemento definito nell'header <locale>
|
||
template< class charT > class numpunct_byname : public std::numpunct<charT>; |
||
std::numpunct_byname è un aspetto std::numpunct che incapsula le preferenze punteggiatura numerici di un locale di cui alla sua costruzione.
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.
Due specializzazioni sono forniti dalla libreria standard
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.
Definizione nell'header
<locale> | |
std::numpunct_byname<char>
|
specifica delle impostazioni locali per il personaggio di aspetto std::numpunct stretto di 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>
|
locale specifico aspetto std::numpunct per caratteri estesi 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. |
Membri tipi
Membro 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>
|
Membri funzioni
costruisce un nuovo aspetto 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. (metodo pubblico) | |
distrugge un aspetto 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. (protetto funzione membro) | |
Esempio
In questo esempio viene demonistrates come applicare le regole di punteggiatura numerici di un'altra lingua senza modificare il resto del locale .
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.
#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';
}
Output:
default locale: 1000.25
default locale with russian numpunct: 1 000,25
Vedi anche
definisce le regole di punteggiatura numerici 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. (classe template) | |