numpunct::truename
Zwraca ciąg jako tekstowa reprezentacja wartości true.
string_type falsename( ) const;
Wartość zwracana
Ciąg jako tekstowa reprezentacja wartości true.
Uwagi
Funkcja Członkowskich zwraca do_truename.
Wszystkich ustawień regionalnych zwraca ciąg "true" do reprezentowania wartości true.
Przykład
// numpunct_truename.cpp
// compile with: /EHsc
#include <locale>
#include <iostream>
#include <sstream>
using namespace std;
int main( )
{
locale loc( "English" );
const numpunct < char> &npunct = use_facet <numpunct <char> >( loc );
cout << loc.name( ) << " truename "<< npunct.truename( ) << endl;
cout << loc.name( ) << " falsename "<< npunct.falsename( ) << endl;
locale loc2("French");
const numpunct <char> &npunct2 = use_facet <numpunct <char> >( loc2 );
cout << loc2.name( ) << " truename "<< npunct2.truename( ) << endl;
cout << loc2.name( ) << " falsename "<< npunct2.falsename( ) << endl;
}
Wymagania
Nagłówek: <locale>
Obszar nazw: std