.TH "std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >" 3cxx "Tue Jul 18 2023" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc > \- String conversions\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Public Types" .in +1c .ti -1c .RI "typedef \fBbasic_string\fP< char, \fBchar_traits\fP< char >, _Byte_alloc > \fBbyte_string\fP" .br .ti -1c .RI "typedef wide_string::traits_type::int_type \fBint_type\fP" .br .ti -1c .RI "typedef _Codecvt::state_type \fBstate_type\fP" .br .ti -1c .RI "typedef \fBbasic_string\fP< _Elem, \fBchar_traits\fP< _Elem >, _Wide_alloc > \fBwide_string\fP" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBwstring_convert\fP ()" .br .RI "Default constructor\&. " .ti -1c .RI "\fBwstring_convert\fP (_Codecvt *__pcvt)" .br .ti -1c .RI "\fBwstring_convert\fP (_Codecvt *__pcvt, state_type __state)" .br .ti -1c .RI "\fBwstring_convert\fP (const \fBbyte_string\fP &__byte_err, const \fBwide_string\fP &__wide_err=\fBwide_string\fP())" .br .ti -1c .RI "\fBwstring_convert\fP (const \fBwstring_convert\fP &)=delete" .br .ti -1c .RI "size_t \fBconverted\fP () const noexcept" .br .RI "The number of elements successfully converted in the last conversion\&. " .ti -1c .RI "\fBwstring_convert\fP & \fBoperator=\fP (const \fBwstring_convert\fP &)=delete" .br .ti -1c .RI "state_type \fBstate\fP () const" .br .RI "The final conversion state of the last conversion\&. " .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "\fBwide_string\fP \fBfrom_bytes\fP (char __byte)" .br .RI "Convert from bytes\&. " .ti -1c .RI "\fBwide_string\fP \fBfrom_bytes\fP (const char *__ptr)" .br .RI "Convert from bytes\&. " .ti -1c .RI "\fBwide_string\fP \fBfrom_bytes\fP (const \fBbyte_string\fP &__str)" .br .RI "Convert from bytes\&. " .ti -1c .RI "\fBwide_string\fP \fBfrom_bytes\fP (const char *__first, const char *__last)" .br .RI "Convert from bytes\&. " .in -1c .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "\fBbyte_string\fP \fBto_bytes\fP (_Elem __wchar)" .br .RI "Convert to bytes\&. " .ti -1c .RI "\fBbyte_string\fP \fBto_bytes\fP (const _Elem *__ptr)" .br .RI "Convert to bytes\&. " .ti -1c .RI "\fBbyte_string\fP \fBto_bytes\fP (const \fBwide_string\fP &__wstr)" .br .RI "Convert to bytes\&. " .ti -1c .RI "\fBbyte_string\fP \fBto_bytes\fP (const _Elem *__first, const _Elem *__last)" .br .RI "Convert to bytes\&. " .in -1c .in -1c .SH "Detailed Description" .PP .SS "template, typename _Byte_alloc = allocator> .br class std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >"String conversions\&. .SH "Constructor & Destructor Documentation" .PP .SS "template, typename _Byte_alloc = allocator> \fBstd::wstring_convert\fP< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::wstring_convert ()\fC [inline]\fP" .PP Default constructor\&. .SS "template, typename _Byte_alloc = allocator> \fBstd::wstring_convert\fP< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::wstring_convert (_Codecvt * __pcvt)\fC [inline]\fP, \fC [explicit]\fP" Constructor\&. .PP \fBParameters\fP .RS 4 \fI__pcvt\fP The facet to use for conversions\&. .RE .PP Takes ownership of \fC__pcvt\fP and will delete it in the destructor\&. .SS "template, typename _Byte_alloc = allocator> \fBstd::wstring_convert\fP< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::wstring_convert (_Codecvt * __pcvt, state_type __state)\fC [inline]\fP" Construct with an initial converstion state\&. .PP \fBParameters\fP .RS 4 \fI__pcvt\fP The facet to use for conversions\&. .br \fI__state\fP Initial conversion state\&. .RE .PP Takes ownership of \fC__pcvt\fP and will delete it in the destructor\&. The object's conversion state will persist between conversions\&. .SS "template, typename _Byte_alloc = allocator> \fBstd::wstring_convert\fP< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::wstring_convert (const \fBbyte_string\fP & __byte_err, const \fBwide_string\fP & __wide_err = \fC\fBwide_string\fP()\fP)\fC [inline]\fP, \fC [explicit]\fP" Construct with error strings\&. .PP \fBParameters\fP .RS 4 \fI__byte_err\fP A string to return on failed conversions\&. .br \fI__wide_err\fP A wide string to return on failed conversions\&. .RE .PP .SH "Member Function Documentation" .PP .SS "template, typename _Byte_alloc = allocator> size_t \fBstd::wstring_convert\fP< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::converted () const\fC [inline]\fP, \fC [noexcept]\fP" .PP The number of elements successfully converted in the last conversion\&. .SS "template, typename _Byte_alloc = allocator> \fBwide_string\fP \fBstd::wstring_convert\fP< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::from_bytes (char __byte)\fC [inline]\fP" .PP Convert from bytes\&. .PP References \fBstd::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::from_bytes()\fP\&. .PP Referenced by \fBstd::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::from_bytes()\fP\&. .SS "template, typename _Byte_alloc = allocator> \fBwide_string\fP \fBstd::wstring_convert\fP< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::from_bytes (const \fBbyte_string\fP & __str)\fC [inline]\fP" .PP Convert from bytes\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::data()\fP, \fBstd::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::from_bytes()\fP, and \fBstd::basic_string< _CharT, _Traits, _Alloc >::size()\fP\&. .SS "template, typename _Byte_alloc = allocator> \fBwide_string\fP \fBstd::wstring_convert\fP< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::from_bytes (const char * __first, const char * __last)\fC [inline]\fP" .PP Convert from bytes\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::get_allocator()\fP\&. .SS "template, typename _Byte_alloc = allocator> \fBwide_string\fP \fBstd::wstring_convert\fP< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::from_bytes (const char * __ptr)\fC [inline]\fP" .PP Convert from bytes\&. .PP References \fBstd::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::from_bytes()\fP\&. .SS "template, typename _Byte_alloc = allocator> state_type \fBstd::wstring_convert\fP< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::state () const\fC [inline]\fP" .PP The final conversion state of the last conversion\&. .SS "template, typename _Byte_alloc = allocator> \fBbyte_string\fP \fBstd::wstring_convert\fP< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::to_bytes (_Elem __wchar)\fC [inline]\fP" .PP Convert to bytes\&. .PP References \fBstd::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::to_bytes()\fP\&. .PP Referenced by \fBstd::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::to_bytes()\fP\&. .SS "template, typename _Byte_alloc = allocator> \fBbyte_string\fP \fBstd::wstring_convert\fP< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::to_bytes (const _Elem * __first, const _Elem * __last)\fC [inline]\fP" .PP Convert to bytes\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::get_allocator()\fP\&. .SS "template, typename _Byte_alloc = allocator> \fBbyte_string\fP \fBstd::wstring_convert\fP< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::to_bytes (const _Elem * __ptr)\fC [inline]\fP" .PP Convert to bytes\&. .PP References \fBstd::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::to_bytes()\fP\&. .SS "template, typename _Byte_alloc = allocator> \fBbyte_string\fP \fBstd::wstring_convert\fP< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::to_bytes (const \fBwide_string\fP & __wstr)\fC [inline]\fP" .PP Convert to bytes\&. .PP References \fBstd::basic_string< _CharT, _Traits, _Alloc >::data()\fP, \fBstd::basic_string< _CharT, _Traits, _Alloc >::size()\fP, and \fBstd::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::to_bytes()\fP\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.