STD::WSTRING_CONVERT(3cxx)
okay bestie, you're on the <pink>std::wstring_c..., _Byte_alloc >(3cxx)</pink> page from the 3cxx manual β yes, the title is long, yes, it ate. This is all about std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >, the C++ string-conversion class, and every overload is here. no cap. π
π NAME π
std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc > β String conversions. β¨
πΈ SYNOPSIS πΈ
#include <locale>
π Public Types π
typedef basic_string< char, char_traits< char >, _Byte_alloc > byte_stringβ the byte-string type, iconic.typedef wide_string::traits_type::int_type int_typeβ the wide-string traitsint_type, periodt.typedef _Codecvt::state_type state_typeβ the codecvt state type, bestie.typedef basic_string< _Elem, char_traits< _Elem >, _Wide_alloc > wide_stringβ the wide-string type, main character energy.
π¦ Public Member Functions π¦
wstring_convert ()β Default constructor. πwstring_convert (_Codecvt *__pcvt)β Constructor. Details are down in the constructor section, keep scrolling.wstring_convert (_Codecvt *__pcvt, state_type __state)β Constructor with state. Details below, bestie.wstring_convert (const byte_string &__byte_err, const wide_string &__wide_err=wide_string())β Construct with error strings.wstring_convert (const wstring_convert &)=deleteβ copy constructor is=delete, not available.size_t converted () const noexceptβ The number of elements successfully converted in the last conversion.wstring_convert & operator= (const wstring_convert &)=deleteβ assignment is=delete, not available.state_type state () constβ The final conversion state of the last conversion.wide_string from_bytes (char __byte)β Convert from bytes.wide_string from_bytes (const char *__ptr)β Convert from bytes.wide_string from_bytes (const byte_string &__str)β Convert from bytes.wide_string from_bytes (const char *__first, const char *__last)β Convert from bytes.byte_string to_bytes (_Elem __wchar)β Convert to bytes.byte_string to_bytes (const _Elem *__ptr)β Convert to bytes.byte_string to_bytes (const wide_string &__wstr)β Convert to bytes.byte_string to_bytes (const _Elem *__first, const _Elem *__last)β Convert to bytes.
π¦ Detailed Description π¦
template<typename _Codecvt, typename _Elem = wchar_t, typename _Wide_alloc =
allocator<_Elem>, typename _Byte_alloc = allocator<char>>
class std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc
>"String conversions.
that >"String conversions. quote mark is literally in the source, iykyk. We're not fixing it. π
π Constructor & Destructor Documentation π
wstring_convert () β default constructor
template<typename _Codecvt , typename _Elem = wchar_t, typename _Wide_alloc
= allocator<_Elem>, typename _Byte_alloc = allocator<char>>
std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc
>::wstring_convert () [inline]
Default constructor. Simple. Clean. No drama. β¨
wstring_convert (_Codecvt * __pcvt)
template<typename _Codecvt , typename _Elem = wchar_t, typename _Wide_alloc
= allocator<_Elem>, typename _Byte_alloc = allocator<char>>
std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc
>::wstring_convert (_Codecvt * __pcvt) [inline], [explicit]
Constructor. π
Parameters:
__pcvtβ The facet to use for conversions.
β οΈ Takes ownership of __pcvt and will delete it in the destructor. That's the important part, bestie β ownership is real.
wstring_convert (_Codecvt * __pcvt, state_type __state)
template<typename _Codecvt , typename _Elem = wchar_t, typename _Wide_alloc
= allocator<_Elem>, typename _Byte_alloc = allocator<char>>
std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc
>::wstring_convert (_Codecvt * __pcvt, state_type __state) [inline]
Construct with an initial converstion state. (yes, that typo is in the source β we're keeping it, periodt.)
Parameters:
__pcvtβ The facet to use for conversions.__stateβ Initial conversion state.
β οΈ Takes ownership of __pcvt and will delete it in the destructor. Also: The object's conversion state will persist between conversions. π
wstring_convert (const byte_string & __byte_err, const wide_string & __wide_err = wide_string())
template<typename _Codecvt , typename _Elem = wchar_t, typename _Wide_alloc
= allocator<_Elem>, typename _Byte_alloc = allocator<char>>
std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc
>::wstring_convert (const byte_string & __byte_err, const wide_string &
__wide_err = wide_string()) [inline], [explicit]
Construct with error strings. π
Parameters:
__byte_errβ A string to return on failed conversions.__wide_errβ A wide string to return on failed conversions.
π Member Function Documentation π
converted () const
template<typename _Codecvt , typename _Elem = wchar_t, typename _Wide_alloc
= allocator<_Elem>, typename _Byte_alloc = allocator<char>> size_t
std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc
>::converted () const [inline], [noexcept]
The number of elements successfully converted in the last conversion. π«
from_bytes (char __byte)
template<typename _Codecvt , typename _Elem = wchar_t, typename _Wide_alloc
= allocator<_Elem>, typename _Byte_alloc = allocator<char>> wide_string
std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc
>::from_bytes (char __byte) [inline]
Convert from bytes. π¦
References std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::from_bytes().
Referenced by std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::from_bytes(), std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::from_bytes(), and std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::from_bytes().
from_bytes (const byte_string & __str)
template<typename _Codecvt , typename _Elem = wchar_t, typename _Wide_alloc
= allocator<_Elem>, typename _Byte_alloc = allocator<char>> wide_string
std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc
>::from_bytes (const byte_string & __str) [inline]
Convert from bytes. π
References std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::from_bytes().
from_bytes (const char * __first, const char * __last)
template<typename _Codecvt , typename _Elem = wchar_t, typename _Wide_alloc
= allocator<_Elem>, typename _Byte_alloc = allocator<char>> wide_string
std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc
>::from_bytes (const char * __first, const char * __last) [inline]
Convert from bytes. πΈ
from_bytes (const char * __ptr)
template<typename _Codecvt , typename _Elem = wchar_t, typename _Wide_alloc
= allocator<_Elem>, typename _Byte_alloc = allocator<char>> wide_string
std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc
>::from_bytes (const char * __ptr) [inline]
Convert from bytes. π
References std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::from_bytes().
state () const
template<typename _Codecvt , typename _Elem = wchar_t, typename _Wide_alloc
= allocator<_Elem>, typename _Byte_alloc = allocator<char>> state_type
std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::state
() const [inline]
The final conversion state of the last conversion. π«Ά
to_bytes (_Elem __wchar)
template<typename _Codecvt , typename _Elem = wchar_t, typename _Wide_alloc
= allocator<_Elem>, typename _Byte_alloc = allocator<char>> byte_string
std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc
>::to_bytes (_Elem __wchar) [inline]
Convert to bytes. π₯
References std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::to_bytes().
Referenced by std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::to_bytes(), std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::to_bytes(), and std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::to_bytes().
to_bytes (const _Elem * __first, const _Elem * __last)
template<typename _Codecvt , typename _Elem = wchar_t, typename _Wide_alloc
= allocator<_Elem>, typename _Byte_alloc = allocator<char>> byte_string
std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc
>::to_bytes (const _Elem * __first, const _Elem * __last) [inline]
Convert to bytes. π
to_bytes (const _Elem * __ptr)
template<typename _Codecvt , typename _Elem = wchar_t, typename _Wide_alloc
= allocator<_Elem>, typename _Byte_alloc = allocator<char>> byte_string
std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc
>::to_bytes (const _Elem * __ptr) [inline]
Convert to bytes. β
References std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::to_bytes().
to_bytes (const wide_string & __wstr)
template<typename _Codecvt , typename _Elem = wchar_t, typename _Wide_alloc
= allocator<_Elem>, typename _Byte_alloc = allocator<char>> byte_string
std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc
>::to_bytes (const wide_string & __wstr) [inline]
Convert to bytes. π
References std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::to_bytes().
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. Doxygen did this automatically, not me, bestie. π€
okay that's the whole page. source/version: libstdc++; generated automatically by Doxygen from the source code. Date: the footer doesn't give one, so I'm not inventing one β periodt. The footer/manual line reads libstdstd::wstring_c..., _Byte_alloc >(3cxx). Bye bestie π
π¦ where this page comes from
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms