[#BloombergLP-bdlde-CharConvertUcs2-ucs2ToUtf8-0b] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlde.adoc[bdlde]::xref:BloombergLP/bdlde/CharConvertUcs2.adoc[CharConvertUcs2]::ucs2ToUtf8 :relfileprefix: ../../../ :mrdocs: Load into `result` the UTF‐8 conversion of the null‐terminated UCS‐2 `srcString`. == Synopsis Declared in `<bdlde_charconvertucs2.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int ucs2ToUtf8( std::pmr::string* result, unsigned short const* srcString, std::size_t* numCharsWritten = 0); ---- == Description Return 0 on success and a non‐zero status otherwise. See the `bsl::string` overload of `ucs2ToUtf8` for full contract details. == Return Value 0 on success and a non‐zero status otherwise == Parameters [cols="1,4"] |=== | Name| Description | *result* | output string for the UTF‐8 conversion | *srcString* | null‐terminated UCS‐2 input | *numCharsWritten* | if non‐null, receives character count written |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#