cplusplus.com
C++ : Reference : Miscellaneous : locale : numpunct : falsename
 
cplusplus.com
Information
Documentation
Reference
Articles
Forum
Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
Miscellaneous
Miscellaneous
complex
exception
functional
iterator
limits
locale
memory
new
numeric
stdexcept
typeinfo
utility
valarray
locale
has_facet
isalnum
isalpha
iscntrl
isdigit
isgraph
islower
isprint
ispunct
isspace
isupper
isxdigit
locale
tolower
toupper
use_facet
standard facets:
codecvt
codecvt_base
codecvt_byname
collate
collate_byname
ctype
ctype_base
ctype_byname
messages
messages_base
messages_byname
moneypunct
moneypunct_byname
money_base
money_get
money_put
numpunct
numpunct_byname
num_get
num_put
time_base
time_get
time_get_byname
time_put
time_put_byname
numpunct
numpunct::numpunct
public member functions:
numpunct::decimal_point
numpunct::falsename
numpunct::grouping
numpunct::thousands_sep
numpunct::truename
public member types:
numpunct::char_type
numpunct::string_type
protected members:
numpunct::do_decimal_point
numpunct::do_falsename
numpunct::do_grouping
numpunct::do_thousands_sep
numpunct::do_truename
numpunct::~numpunct


numpunct::falsename

public member function
string_type falsename() const;

Return string representing false

Returns the string used to represent the boolean value false.

For the standard specialization of char the function returns "false".
For the standard specialization of wchar_t the function returns L"false".

During its operation, the version of this function in the generic template simply calls the virtual protected member do_falsename, which is the member function in charge of performing the actions described above.

Parameters

none

Return value

The string used to represent the boolean value false.
string_type is a member alias of basic_string<charT>, where charT is the template parameter (i.e., the facet's character type).

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// numpunct::falsename example
#include <iostream>
#include <locale>
using namespace std;

int main ()
{
  const numpunct<char>& punct_facet = use_facet<numpunct<char> >(cout.getloc());

  cout << "2+2=5 is ";
  if (2+2==5)
	  cout << punct_facet.truename();
  else
	  cout << punct_facet.falsename();

  cout << endl;
  return 0;
} 


Output:

2+2=5 is false

See also