Compartilhar via


numpunct::falsename

Returns a string to use as a text representation of the value false.

string_type falsename( ) const;

Return Value

A string containing a sequence of CharTypes to use as a text representation of the value false.

Remarks

The member function returns the string "false" to represent the value false in all locales.

The member function returns do_falsename.

Example

// numpunct_falsename.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;
}
English_United States.1252 truename true
English_United States.1252 falsename false
French_France.1252 truename true
French_France.1252 falsename false

Requirements

Header: <locale>

Namespace: std

See Also

Reference

numpunct Class