wide_string from_bytes( char byte );
(1)wide_string from_bytes( const char* ptr );
(2)wide_string from_bytes( const byte_string& str );
(3)wide_string from_bytes( const char* first, const char* last );
(4)Converts a byte sequence to a wide string using the facet pointed to by cvtptr
.
1) The byte sequence only consists of one element byte.
2) The byte sequence is the null-terminated sequence beginning at ptr.
3) The byte sequence is the sequence contained in str.
4) The byte sequence is the range [
first,
last)
.
Before the conversion begins, if *this was not constructed with constructor overload (3), cvtstate
will be set to its default value (the initial conversion state).
The number of input elements successfully converted will be stored in cvtcount
.
If the conversion succeeds, returns the conversion result. Otherwise, if *this is constructed with constructor overload (4), returns wide_err_string
.
If the conversion fails and *this was not constructed with constructor overload (4), throws std::range_error.
[edit] ExampleOutput:
UTF-16 conversion produced 5 code units: 0x7a 0xdf 0x6c34 0xd834 0xdd0b UTF-32 conversion produced 4 code units: 0x7a 0xdf 0x6c34 0x1d10b[edit] See also converts a wide string into a byte string
ExternT
to InternT
, such as when reading from file
std::codecvt<InternT,ExternT,StateT>
) [edit]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4