Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
Miscellaneous
IOstream Library
manipulators
classes:
filebuf
fstream
ifstream
ios
iostream
ios_base
istream
istringstream
ofstream
ostream
ostringstream
streambuf
stringbuf
stringstream
objects:
cerr
cin
clog
cout
types:
fpos
streamoff
streampos
streamsize
ios
ios::ios
ios::~ios
member functions:
ios::bad
ios::clear
ios::copyfmt
ios::eof
ios::exceptions
ios::fail
ios::fill
ios::good
ios::imbue
ios::init
ios::narrow
ios::operator!
ios::operator void*
ios::rdbuf
ios::rdstate
ios::setstate
ios::tie
ios::widen


ios::narrow

public member function
char narrow ( char c, char dfault ) const;

Narrow character

Converts localized parameter c to its standard char equivalent.

If the parameter c has no standard char equivalent, the function returns the parameter dfault.

When the basic template basic_ios is used with a type other than char, the function also performs the appropiate conversion from the char_type used to the fundamental char type.

Parameters

c
character to be narrowed.
dfault
character to be returned if c has no standard equivalent.

Return Value

The char equivalent of c, if any. Otherwise, it returns dfault.

Basic template member declaration

( basic_ios<charT,traits> )
1
2
typedef charT char_type;
char narrow ( char_type c, char dfault ) const;


See also