std::ctype<CharT>::widen,do_widen (3) - Linux Man Pages
Defined in header <locale>
CharT widen( char c ) const;
const char* widen( const char* beg, const char* end, CharT* dst ) const;
virtual CharT do_widen( char c ) const;
virtual const char* do_widen( const char* beg, const char* end, CharT* dst ) const;
1,2) public member function, calls the protected virtual member function do_widen of the most derived class.
3) Converts the single-byte character c to the corresponding wide character representation using the simplest reasonable transformation. Typically, this applies only to the characters whose multibyte encoding is a single byte (e.g. U+0000-U+007F in UTF-8).
4) For every character in the character array [beg, end), writes the corresponding widened character to the successive locations in the character array pointed to by dst.
Widening always returns a wide character, but only the characters from the basic source character set (latin letters, digits, and punctuations required to write a C++ program) are guaranteed to have a unique, well-defined, widening transformation, which is also guaranteed to be reversible (by narrow()). In practice, all characters whose multibyte representation is a single byte are usually widened to their wide character counterparts, and the rest of the possible single-byte values are usually mapped into the same placeholder value, typically CharT(-1).
Widening, if successful, preserves all character classification categories known to is().
c - character to convert
dflt - default value to produce if the conversion fails
beg - pointer to the first character in an array of characters to convert
end - one past the end pointer for the array of characters to convert
dst - pointer to the first element of the array of char to fill
1,3) widened character
// Run this code
narrow (public member function)
widen (public member function of std::basic_ios<CharT,Traits>)