[#BloombergLP-bdlde-CharConvertUcs2-ucs2ToUtf8-01]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlde.adoc[bdlde]::xref:BloombergLP/bdlde/CharConvertUcs2.adoc[CharConvertUcs2]::ucs2ToUtf8
:relfileprefix: ../../../
:mrdocs:

Load into `result` the UTF&hyphen;8 conversion of the null&hyphen;terminated UCS&hyphen;2 `srcString`&period; Optionally report characters written via `numCharsWritten`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
ucs2ToUtf8(
    xref:bsl/string.adoc[bsl::string]* result,
    unsigned short const* srcString,
    std::size&lowbar;t* numCharsWritten = 0);
----


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