| std::basic_string<char, ReboundCharTraits, ReboundAllocator> Chusov::String::u8_encode_string | ( | const BasicStringType & | str | ) |
Converts a given C++ string of Unicode code points to the corresponding UTF-8 representation. .
| BasicStringType | is an instantiation of the std::basic_string or (C++17) std::basic_string_view standard templates for the type Chusov::String::ucp_t. |
| str | is an std::basic_string or (C++17) std::basic_string_view string object specialized for the Chusov::String::ucp_t characters. |
str with the an Allocator and a CharTraits policy which are respecializations of char. If the type of BasicStringType is std::basic_string_view,u8_encode_string (see below) allow custom specification of the used Allocator and/or CharTraits. 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 encode a string stored within an arbitrary C++ Container. | Chusov::Exceptions::InvalidCharSequenceException | The str is detected to contain an invalid Chusov::String::ucp_t code point. |