Converts a given zero-terminated string of Unicode code points to its UTF-8 representation and returns the latter as a C++ string object.
- Template Parameters
-
CharTraits | is a CharTraits object used to instantiate the std::basic_string template and create the output string. By default it resolves to. |
Allocator | is an Allocator object to instantiate the std::basic_string to produce the type of the resulting string. By default it resolves to. |
CPtr | is a (referenced) type of a possibly cv-qualified pointer to a C-string of ucp_t characters. This overload of u8_encode_string does not participate in overload resolution unless CPtr is a (possibly referenced and/or cv_qualified) pointer to ucp_t . |
- Parameters
-
pszUcp | is a pointer to a zero terminated string of ucp_t code points to convert to an output UTF-8 C++ representation. |
- Returns
- A newly created multi-byte
char
based C++ string object holding the UTF-8 representation of pszUcp
.
- Exceptions
-
- Note
- The
CPtr
template parameter is introduced to disambiguate calls to this overload as opposed to the overload which accepts references to arrays of ucp_t
.
- See also
- ucp_t