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 traits int_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