libstdc++
|
Public Types | |
typedef basic_string< char, char_traits< char >, _Byte_alloc > | byte_string |
typedef wide_string::traits_type::int_type | int_type |
typedef _Codecvt::state_type | state_type |
typedef basic_string< _Elem, char_traits< _Elem >, _Wide_alloc > | wide_string |
Public Member Functions | |
wstring_convert (_Codecvt *__pcvt=new _Codecvt()) | |
wstring_convert (_Codecvt *__pcvt, state_type __state) | |
wstring_convert (const byte_string &__byte_err, const wide_string &__wide_err=wide_string()) | |
wstring_convert (const wstring_convert &)=delete | |
size_t | converted () const noexcept |
wstring_convert & | operator= (const wstring_convert &)=delete |
state_type | state () const |
wide_string | from_bytes (char __byte) |
wide_string | from_bytes (const char *__ptr) |
wide_string | from_bytes (const byte_string &__str) |
wide_string | from_bytes (const char *__first, const char *__last) |
byte_string | to_bytes (_Elem __wchar) |
byte_string | to_bytes (const _Elem *__ptr) |
byte_string | to_bytes (const wide_string &__wstr) |
byte_string | to_bytes (const _Elem *__first, const _Elem *__last) |
String conversions.
Definition at line 169 of file locale_conv.h.
|
inlineexplicit |
Default constructor.
__pcvt | The facet to use for conversions. |
Takes ownership of __pcvt
and will delete it in the destructor.
Definition at line 184 of file locale_conv.h.
Referenced by std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::wstring_convert().
|
inline |
Construct with an initial converstion state.
__pcvt | The facet to use for conversions. |
__state | Initial conversion state. |
Takes ownership of __pcvt
and will delete it in the destructor. The object's conversion state will persist between conversions.
Definition at line 198 of file locale_conv.h.
|
inlineexplicit |
Construct with error strings.
__byte_err | A string to return on failed conversions. |
__wide_err | A wide string to return on failed conversions. |
Definition at line 211 of file locale_conv.h.
References std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::wstring_convert().
|
inlinenoexcept |
The number of elements successfully converted in the last conversion.
Definition at line 301 of file locale_conv.h.
|
inline |
Convert from bytes.
Definition at line 230 of file locale_conv.h.
Referenced by std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::from_bytes().
|
inline |
Convert from bytes.
Definition at line 237 of file locale_conv.h.
References std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::from_bytes().
|
inline |
Convert from bytes.
Definition at line 241 of file locale_conv.h.
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().
|
inline |
Convert from bytes.
Definition at line 248 of file locale_conv.h.
References std::basic_string< _CharT, _Traits, _Alloc >::get_allocator().
|
inline |
The final conversion state of the last conversion.
Definition at line 304 of file locale_conv.h.
|
inline |
Convert to bytes.
Definition at line 264 of file locale_conv.h.
Referenced by std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::to_bytes().
|
inline |
Convert to bytes.
Definition at line 271 of file locale_conv.h.
References std::wstring_convert< _Codecvt, _Elem, _Wide_alloc, _Byte_alloc >::to_bytes().
|
inline |
Convert to bytes.
Definition at line 277 of file locale_conv.h.
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().
|
inline |
Convert to bytes.
Definition at line 284 of file locale_conv.h.
References std::basic_string< _CharT, _Traits, _Alloc >::get_allocator().