.TH "std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >" 3cxx "Fri May 28 2021" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc > \- String conversions\&. .SH SYNOPSIS .br .PP .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\&. .PP Definition at line 232 of file locale_conv\&.h\&. .SH "Constructor & Destructor Documentation" .PP .SS "template, typename _Byte_alloc = allocator> \fBstd::wstring_convert\fP< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::\fBwstring_convert\fP ()\fC [inline]\fP" .PP Default constructor\&. .PP Definition at line 241 of file locale_conv\&.h\&. .SS "template, typename _Byte_alloc = allocator> \fBstd::wstring_convert\fP< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::\fBwstring_convert\fP (_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\&. .PP Definition at line 250 of file locale_conv\&.h\&. .SS "template, typename _Byte_alloc = allocator> \fBstd::wstring_convert\fP< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::\fBwstring_convert\fP (_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\&. .PP Definition at line 264 of file locale_conv\&.h\&. .SS "template, typename _Byte_alloc = allocator> \fBstd::wstring_convert\fP< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::\fBwstring_convert\fP (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 .PP Definition at line 277 of file locale_conv\&.h\&. .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\&. .PP Definition at line 367 of file locale_conv\&.h\&. .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 Definition at line 296 of file locale_conv\&.h\&. .PP Referenced by std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::from_bytes()\&. .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 Definition at line 307 of file locale_conv\&.h\&. .PP References std::basic_string< _CharT, _Traits, _Alloc >::data(), std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::from_bytes(), and std::basic_string< _CharT, _Traits, _Alloc >::size()\&. .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 Definition at line 314 of file locale_conv\&.h\&. .PP References std::basic_string< _CharT, _Traits, _Alloc >::get_allocator()\&. .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 Definition at line 303 of file locale_conv\&.h\&. .PP References std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::from_bytes()\&. .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\&. .PP Definition at line 370 of file locale_conv\&.h\&. .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 Definition at line 330 of file locale_conv\&.h\&. .PP Referenced by std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::to_bytes()\&. .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 Definition at line 350 of file locale_conv\&.h\&. .PP References std::basic_string< _CharT, _Traits, _Alloc >::get_allocator()\&. .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 Definition at line 337 of file locale_conv\&.h\&. .PP References std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::to_bytes()\&. .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 Definition at line 343 of file locale_conv\&.h\&. .PP References std::basic_string< _CharT, _Traits, _Alloc >::data(), std::basic_string< _CharT, _Traits, _Alloc >::size(), and std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::to_bytes()\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.