std::wcscmp

Defined in header <cwchar> int wcscmp( const wchar_t* lhs, const wchar_t* rhs ); Compares two null-terminated wide strings lexicographically. The sign of the result is the sign of the difference between the values of the first pair of wide characters that differ in the strings being compared. The behavior is undefined if lhs or rhs are not pointers to null-terminated wide strings. Parameters lhs, rhs - pointers to the null-terminated wide strings to compare Ret

std::wcschr

Defined in header <cwchar> const wchar_t* wcschr( const wchar_t* str, wchar_t ch ); wchar_t* wcschr( wchar_t* str, wchar_t ch ); Finds the first occurrence of the wide character ch in the wide string pointed to by str. Parameters str - pointer to the null-terminated wide string to be analyzed ch - wide character to search for Return value Pointer to the found character in str, or NULL if no such character is found. Example #include

std::wcscat

Defined in header <cwchar> wchar_t *wcscat( wchar_t *dest, const wchar_t *src ); Appends a copy of the wide string pointed to by src to the end of the wide string pointed to by dest. The wide character src[0] replaces the null terminator at the end of dest. The resulting wide string is null-terminated. The behavior is undefined if the destination array is not large enough for the contents of both str and dest and the terminating null wide character. The behavior is undefine

std::wcrtomb

Defined in header <cwchar> std::size_t wcrtomb( char* s, wchar_t wc, std::mbstate_t* ps ); Converts a wide character to its narrow multibyte representation. If s is not a null pointer, the function determines the number of bytes necessary to store the multibyte character representation of wc (including any shift sequences), and stores the multibyte character representation in the character array whose first element is pointed to by s. At most MB_CUR_MAX bytes can be written

std::wbuffer_convert::wbuffer_convert

explicit wbuffer_convert( std::streambuf* bytebuf = 0, Codecvt* pcvt = new Codecvt, state_type state = state_type() ); (1) wbuffer_convert(const std::wbuffer_convert&) = delete; (2) (since C++14) 1) Constructs the wbuffer_convert object with the specified underlying byte stream, specified codecvt facet, and specified initial conversion state (all parameters are optional) 2) The copy constructor is deleted, wbuffer_convert i

std::wbuffer_convert::state

Defined in header <locale> state_type state() const; Returns the current value of the conversion state, which is stored in this wbuffer_convert object. The conversion state may be explicitly set in the constructor and is updated by all conversion operations. Return value The current conversion state. Example See also state returns the current conversion state (public member function of std::wstring_convert) mbsinit checks if the mbstate_t object represents

std::wbuffer_convert::rdbuf

Defined in header <locale> std::streambuf* rdbuf() const; (1) std::streambuf* rdbuf( std::streambuf* bytebuf ); (2) 1) returns the pointer to the underlying byte stream. 2) replaces the associated byte stream with bytebuf . Return value 1) the current underlying byte stream. 2) the previous byte stream. Example #include <iostream> #include <sstream> #include <locale> #include <codecvt> int main() { // convert UTF-8 to UCS4 std::

std::wbuffer_convert

Defined in header <locale> template<class Codecvt, class Elem = wchar_t, class Tr = std::char_traits<Elem> > class wbuffer_convert : public std::basic_streambuf<Elem, Tr> (since C++11) std::wbuffer_convert is a wrapper over stream buffer of type std::basic_streambuf<char> which gives it the appearance of std::basic_streambuf<Elem>. All I/O performed through std::wbuffer_convert undergoes character conversion as defined by the

std::vwscanf

Defined in header <cwchar> int vwscanf( const wchar_t* format, va_list vlist ); (1) (since C++11) int vfwscanf( std::FILE* stream, const wchar_t* format, va_list vlist ); (2) (since C++11) int vswscanf( const wchar_t* buffer, const wchar_t* format, va_list vlist ); (3) (since C++11) Reads data from the a variety of sources, interprets it according to format and stores the results into locations defined by vlist. 1) Reads the data from stdin 2) Reads the data

std::vwprintf

Defined in header <cwchar> int vwprintf( const wchar_t* format, va_list vlist ); (1) int vfwprintf( std::FILE* stream, const wchar_t* format, va_list vlist ); (2) int vswprintf( const wchar_t* buffer, std::size_t buf_size, const wchar_t* format, va_list vlist ); (3) Loads the data from locations, defined by vlist,, converts them to wide string equivalents and writes the results to a variety of sinks. 1) Writes the results to stdout. 2) Writes th