Produces a C++ string of Unicode 11.0 code points from bytes of a C++ container with a UTF-8 encoded string. .
- Template Parameters
-
CharTraitsTo | specifies a CharTraits type used to instantiate the std::basic_string class in order to produce the output string. By default it is an instantiation of std::char_traits for the type ucp_t. Such specialization is provided by the chsvlib library to treat ucp_t based strings as case-sensitive and 0-terminated. |
AllocatorTo | is a type of an Allocator used to instantiate the returned string object. By default it resolves to. |
Container | is a deducible type of a C++ Container, e.g. [std::vector], of the char based string to convert. See the note below about a use of the u8_decode_string function templates with C++ strings - std::basic_string and std::basic_string_view. |
- Parameters
-
str | is a C++ Container of characters of the type char to hold the input UTF-8 string. |
- Returns
- A newly created string, an instantiation of std::basic_string, with Unicode 11.0 code points as its elements along with optionally specified CharTraits and Allocator.
- Note
- This overload does not participate in the overload resolution if
Container
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. Another template implements this instead.
- Exceptions
-
- See also
- u8_decode_string An overload chosen if the parameter 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.