std::basic_string<ucp_t, CharTraitsTo, ReboundAllocator> Chusov::String::u8_decode_string | ( | const BasicStringType & | str | ) |
Produces a C++ string of Unicode 11.0 code points from a C++ UTF-8 encoded string with a custom char-traits class. .
CharTraitsTo | specifies a CharTraits type used to instantiate the std::basic_string template in order to produce the output string. The std::char_traits<Chusov::String::ucp_t>
|
BasicStringType | is an instantiation of the std::basic_string or (C++17) std::basic_string_view standard templates for the type char . |
str | is a std::basic_string or (C++17) std::basic_string_view string object specialized for the char characters. |
BasicStringType
is an instantiation of std::basic_string, the type of allocator used by the returned string is default-constructed allocator of the type BasicStringType
, then the used allocator isu8_decode_string
(see below) allow omission of CharTraitsTo
specification or adding specification of an allocator object to be used by the returned string. BasicStringType
is an std::basic_string or (C++17) std::basic_string_view object with the traits_type
subtype be a template of one type argument. Use another template to decode a string stored within an arbitrary C++ Container. Chusov::Exceptions::InvalidCharSequenceException | The specified UTF-8 string is detected to contain an invalid or incomplete multi-byte UTF-8 character. |
CharTraitsTo
parameter and uses the CharTraits policy class of str
respecialized for Chusov::String::ucp_t. str
.