[#BloombergLP-bdlde-CharConvertUtf16-utf16ToUtf8-0bf]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlde.adoc[bdlde]::xref:BloombergLP/bdlde/CharConvertUtf16.adoc[CharConvertUtf16]::utf16ToUtf8
:relfileprefix: ../../../
:mrdocs:

`utf16ToUtf8` overloads

== Synopses

Declared in `&lt;bdlde&lowbar;charconvertutf16&period;h&gt;`

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0da.adoc[utf16ToUtf8](
    xref:bsl/string.adoc[bsl::string]* dstString,
    std::u16string&lowbar;view const& srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0da.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-059.adoc[utf16ToUtf8](
    xref:bsl/string.adoc[bsl::string]* dstString,
    std::wstring&lowbar;view const& srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-059.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0e8.adoc[utf16ToUtf8](
    xref:bsl/string.adoc[bsl::string]* dstString,
    char16&lowbar;t const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0e8.adoc[_» more&period;&period;&period;_]#

Convert the UTF&hyphen;16 source to UTF&hyphen;8 in the destination&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0c8.adoc[utf16ToUtf8](
    xref:bsl/string.adoc[bsl::string]* dstString,
    unsigned short const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0c8.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0fc.adoc[utf16ToUtf8](
    xref:bsl/string.adoc[bsl::string]* dstString,
    wchar&lowbar;t const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0fc.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0d5.adoc[utf16ToUtf8](
    std::pmr::string* dstString,
    std::u16string&lowbar;view const& srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0d5.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0b6d.adoc[utf16ToUtf8](
    std::pmr::string* dstString,
    std::wstring&lowbar;view const& srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0b6d.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0d3.adoc[utf16ToUtf8](
    std::pmr::string* dstString,
    char16&lowbar;t const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0d3.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-04.adoc[utf16ToUtf8](
    std::pmr::string* dstString,
    unsigned short const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-04.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0d1.adoc[utf16ToUtf8](
    std::pmr::string* dstString,
    wchar&lowbar;t const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0d1.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-01f.adoc[utf16ToUtf8](
    std::string* dstString,
    std::u16string&lowbar;view const& srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-01f.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0e3.adoc[utf16ToUtf8](
    std::string* dstString,
    std::wstring&lowbar;view const& srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0e3.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0d9.adoc[utf16ToUtf8](
    std::string* dstString,
    char16&lowbar;t const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0d9.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0dd.adoc[utf16ToUtf8](
    std::string* dstString,
    unsigned short const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0dd.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-09c9.adoc[utf16ToUtf8](
    std::string* dstString,
    wchar&lowbar;t const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-09c9.adoc[_» more&period;&period;&period;_]#

Convert the UTF&hyphen;16 source to UTF&hyphen;8 in the destination&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-09c3.adoc[utf16ToUtf8](
    xref:bsl/vector-00d.adoc[bsl::vector&lt;char&gt;]* dstVector,
    std::u16string&lowbar;view const& srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-09c3.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0686.adoc[utf16ToUtf8](
    xref:bsl/vector-00d.adoc[bsl::vector&lt;char&gt;]* dstVector,
    std::wstring&lowbar;view const& srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0686.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-03.adoc[utf16ToUtf8](
    xref:bsl/vector-00d.adoc[bsl::vector&lt;char&gt;]* dstVector,
    char16&lowbar;t const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-03.adoc[_» more&period;&period;&period;_]#

Convert the UTF&hyphen;16 source to UTF&hyphen;8 in the destination&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0fb.adoc[utf16ToUtf8](
    xref:bsl/vector-00d.adoc[bsl::vector&lt;char&gt;]* dstVector,
    unsigned short const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0fb.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-01e.adoc[utf16ToUtf8](
    xref:bsl/vector-00d.adoc[bsl::vector&lt;char&gt;]* dstVector,
    wchar&lowbar;t const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-01e.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-02f.adoc[utf16ToUtf8](
    std::pmr::vector&lt;char&gt;* dstVector,
    std::u16string&lowbar;view const& srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-02f.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-080.adoc[utf16ToUtf8](
    std::pmr::vector&lt;char&gt;* dstVector,
    std::wstring&lowbar;view const& srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-080.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-064.adoc[utf16ToUtf8](
    std::pmr::vector&lt;char&gt;* dstVector,
    char16&lowbar;t const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-064.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-081d.adoc[utf16ToUtf8](
    std::pmr::vector&lt;char&gt;* dstVector,
    unsigned short const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-081d.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-05e5.adoc[utf16ToUtf8](
    std::pmr::vector&lt;char&gt;* dstVector,
    wchar&lowbar;t const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-05e5.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0ca.adoc[utf16ToUtf8](
    std::vector&lt;char&gt;* dstVector,
    std::u16string&lowbar;view const& srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0ca.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0db.adoc[utf16ToUtf8](
    std::vector&lt;char&gt;* dstVector,
    std::wstring&lowbar;view const& srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0db.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0094.adoc[utf16ToUtf8](
    std::vector&lt;char&gt;* dstVector,
    char16&lowbar;t const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0094.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-068d.adoc[utf16ToUtf8](
    std::vector&lt;char&gt;* dstVector,
    unsigned short const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-068d.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-093.adoc[utf16ToUtf8](
    std::vector&lt;char&gt;* dstVector,
    wchar&lowbar;t const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-093.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-020.adoc[utf16ToUtf8](
    xref:bsl/string.adoc[bsl::string]* dstString,
    unsigned short const* srcString,
    std::size&lowbar;t srcLengthInWords,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-020.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-007.adoc[utf16ToUtf8](
    std::pmr::string* dstString,
    unsigned short const* srcString,
    std::size&lowbar;t srcLengthInWords,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-007.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-05e2.adoc[utf16ToUtf8](
    std::string* dstString,
    unsigned short const* srcString,
    std::size&lowbar;t srcLengthInWords,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-05e2.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0a3.adoc[utf16ToUtf8](
    xref:bsl/vector-00d.adoc[bsl::vector&lt;char&gt;]* dstVector,
    unsigned short const* srcString,
    std::size&lowbar;t srcLengthInWords,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0a3.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0a4.adoc[utf16ToUtf8](
    std::pmr::vector&lt;char&gt;* dstVector,
    unsigned short const* srcString,
    std::size&lowbar;t srcLengthInWords,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0a4.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-00e.adoc[utf16ToUtf8](
    std::vector&lt;char&gt;* dstVector,
    unsigned short const* srcString,
    std::size&lowbar;t srcLengthInWords,
    std::size&lowbar;t* numCodePointsWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-00e.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-05f.adoc[utf16ToUtf8](
    char* dstBuffer,
    std::size&lowbar;t dstCapacity,
    std::u16string&lowbar;view const& srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    std::size&lowbar;t* numBytesWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-05f.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0d4.adoc[utf16ToUtf8](
    char* dstBuffer,
    std::size&lowbar;t dstCapacity,
    std::wstring&lowbar;view const& srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    std::size&lowbar;t* numBytesWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0d4.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0090.adoc[utf16ToUtf8](
    char* dstBuffer,
    std::size&lowbar;t dstCapacity,
    char16&lowbar;t const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    std::size&lowbar;t* numBytesWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0090.adoc[_» more&period;&period;&period;_]#

Convert the UTF&hyphen;16 source to UTF&hyphen;8 in the destination&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0813.adoc[utf16ToUtf8](
    char* dstBuffer,
    std::size&lowbar;t dstCapacity,
    unsigned short const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    std::size&lowbar;t* numBytesWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0813.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-08e.adoc[utf16ToUtf8](
    char* dstBuffer,
    std::size&lowbar;t dstCapacity,
    wchar&lowbar;t const* srcString,
    std::size&lowbar;t* numCodePointsWritten = 0,
    std::size&lowbar;t* numBytesWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-08e.adoc[_» more&period;&period;&period;_]#

Load into the destination the UTF&hyphen;8 conversion of the UTF&hyphen;16 source&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0b62.adoc[utf16ToUtf8](
    char* dstBuffer,
    std::size&lowbar;t dstCapacity,
    unsigned short const* srcString,
    std::size&lowbar;t srcLengthInWords,
    std::size&lowbar;t* numCodePointsWritten = 0,
    std::size&lowbar;t* numBytesWritten = 0,
    char errorByte = &apos;?&apos;,
    xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder&colon;&colon;e&lowbar;HOST);
----

[.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0b62.adoc[_» more&period;&period;&period;_]#

== Return Value

* 0 on success and a non&hyphen;zero status otherwise
* 0 on success and `CharConvertStatus&colon;&colon;k&lowbar;INVALID&lowbar;INPUT&lowbar;BIT` otherwise
* 0 on success and a bitwise&hyphen;or of the bits specified by `CharConvertStatus&colon;&colon;Enum` otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *dstString*
| destination for the converted output
| *srcString*
| source string to convert
| *numCodePointsWritten*
| if non&hyphen;null, set to the code&hyphen;point count written
| *errorByte*
| replacement for invalid input, or 0 to skip
| *byteOrder*
| UTF&hyphen;16 byte order&semi; host order if unspecified
| *dstVector*
| destination for the converted output
| *srcLengthInWords*
| number of UTF&hyphen;16 words in `srcString`
| *dstBuffer*
| destination buffer for the converted output
| *dstCapacity*
| capacity of `dstBuffer` in elements
| *numBytesWritten*
| if non&hyphen;null, set to the byte count written
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
