[#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 `<bdlde_charconvertutf16.h>` Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [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_view const& srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0da.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [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_view const& srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-059.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [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_t const* srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0e8.adoc[_» more..._]# Load into the specified `dstString` the result of converting the specified UTF‐16 `srcString` to its UTF‐8 equivalent. Optionally specify `numCodePointsWritten`, which (if not 0) indicates the location of the modifiable variable into which the number of Unicode code points written, including the null terminator, is to be loaded, where one code point may occupy multiple bytes. Optionally specify an `errorByte` to be substituted (if not 0) for invalid encodings in the input string. Invalid encodings are incomplete multi‐word encodings or parts of a two‐word encoding out of their proper sequence. If `errorByte` is 0, invalid input sequences are ignored (i.e., produce no corresponding output). Any previous contents of the destination are discarded. Optionally specify `byteOrder` to indicate the byte order of the UTF‐16 input; if `byteOrder` is not specified, the input is assumed to be in host byte order. Return 0 on success and `CharConvertStatus::k_INVALID_INPUT_BIT` if one or more invalid sequences were encountered in the input. The behavior is undefined unless `errorByte` is either 0 or a valid single‐byte Unicode code point (`0 < errorByte < 0x80`) and `srcString` is null‐terminated if supplied as a `const wchar_t *`. Note that if `srcString` is a `bslstl::StringRefWide`, it may contain embedded 0 words that will be translated to null bytes embedded in the output. [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_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0c8.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [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_t const* srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0fc.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0d5.adoc[utf16ToUtf8]( std::pmr::string* dstString, std::u16string_view const& srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0d5.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0b6d.adoc[utf16ToUtf8]( std::pmr::string* dstString, std::wstring_view const& srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0b6d.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0d3.adoc[utf16ToUtf8]( std::pmr::string* dstString, char16_t const* srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0d3.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [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_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-04.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0d1.adoc[utf16ToUtf8]( std::pmr::string* dstString, wchar_t const* srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0d1.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-01f.adoc[utf16ToUtf8]( std::string* dstString, std::u16string_view const& srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-01f.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0e3.adoc[utf16ToUtf8]( std::string* dstString, std::wstring_view const& srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0e3.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0d9.adoc[utf16ToUtf8]( std::string* dstString, char16_t const* srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0d9.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [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_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0dd.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-09c9.adoc[utf16ToUtf8]( std::string* dstString, wchar_t const* srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-09c9.adoc[_» more..._]# Load into the specified `dstVector` the null‐terminated result of converting the specified UTF‐16 `srcString` to its UTF‐8 equivalent. Optionally specify `numCodePointsWritten`, which (if not 0) indicates the location of the modifiable variable into which the number of Unicode code points written, including the null terminator, is to be loaded, where one code point may occupy multiple bytes. Optionally specify an `errorByte` to be substituted (if not 0) for invalid encodings in the input string. Invalid encodings are incomplete multi‐word encodings or parts of a two‐word encoding out of their proper sequence. If `errorByte` is 0, invalid input sequences are ignored (i.e., produce no corresponding output). Optionally specify `byteOrder` to indicate the byte order of the UTF‐16 input; if `byteOrder` is not specified, the input is assumed to be in host byte order. Any previous contents of the destination are discarded. Return 0 on success and `CharConvertStatus::k_INVALID_INPUT_BIT` if one or more invalid sequences were encountered in the input. The behavior is undefined unless `errorByte` is either 0 or a valid single‐byte Unicode code point (`0 < errorByte < 0x80`) and `srcString` is null‐terminated if supplied as a `const wchar_t *`. Note that if `srcString` is a `bslstl::StringRef`, it may contain embedded 0 words that will be translated to null bytes embedded in the output. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-09c3.adoc[utf16ToUtf8]( xref:bsl/vector-00d.adoc[bsl::vector<char>]* dstVector, std::u16string_view const& srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-09c3.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0686.adoc[utf16ToUtf8]( xref:bsl/vector-00d.adoc[bsl::vector<char>]* dstVector, std::wstring_view const& srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0686.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-03.adoc[utf16ToUtf8]( xref:bsl/vector-00d.adoc[bsl::vector<char>]* dstVector, char16_t const* srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-03.adoc[_» more..._]# Load into the specified `dstVector` the null‐terminated result of converting the specified UTF‐16 `*srcString` to its UTF‐8 equivalent. Optionally specify `srcLengthInWords`, the number of `unsigned short`s of input. If `srcLengthInWords` is not specified, the input must be terminated by a null word. Optionally specify `numCodePointsWritten`, which (if not 0) indicates the location of the modifiable variable into which the number of Unicode code points written, including the null terminator, is to be loaded, where one code point may occupy multiple bytes. Optionally specify an `errorByte` to be substituted (if not 0) for invalid encodings in the input string. Invalid encodings are incomplete multi‐word encodings or parts of a two‐word encoding out of their proper sequence. If `errorByte` is 0, invalid input sequences are ignored (i.e., produce no corresponding output). Optionally specify `byteOrder` to indicate the byte order of the UTF‐16 input; if `byteOrder` is not specified, the input is assumed to be in host byte order. Any previous contents of the destination are discarded. Return 0 on success and `CharConvertStatus::k_INVALID_INPUT_BIT` if one or more invalid sequences were encountered in the input. The behavior is undefined unless either `srcLengthInWords` is passed or `srcString` is null‐terminated, and `errorByte` is either 0 or a valid single‐byte Unicode code point (`0 < errorByte < 0x80`). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0fb.adoc[utf16ToUtf8]( xref:bsl/vector-00d.adoc[bsl::vector<char>]* dstVector, unsigned short const* srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0fb.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-01e.adoc[utf16ToUtf8]( xref:bsl/vector-00d.adoc[bsl::vector<char>]* dstVector, wchar_t const* srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-01e.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-02f.adoc[utf16ToUtf8]( std::pmr::vector<char>* dstVector, std::u16string_view const& srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-02f.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-080.adoc[utf16ToUtf8]( std::pmr::vector<char>* dstVector, std::wstring_view const& srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-080.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-064.adoc[utf16ToUtf8]( std::pmr::vector<char>* dstVector, char16_t const* srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-064.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-081d.adoc[utf16ToUtf8]( std::pmr::vector<char>* dstVector, unsigned short const* srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-081d.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-05e5.adoc[utf16ToUtf8]( std::pmr::vector<char>* dstVector, wchar_t const* srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-05e5.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0ca.adoc[utf16ToUtf8]( std::vector<char>* dstVector, std::u16string_view const& srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0ca.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0db.adoc[utf16ToUtf8]( std::vector<char>* dstVector, std::wstring_view const& srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0db.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0094.adoc[utf16ToUtf8]( std::vector<char>* dstVector, char16_t const* srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0094.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-068d.adoc[utf16ToUtf8]( std::vector<char>* dstVector, unsigned short const* srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-068d.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-093.adoc[utf16ToUtf8]( std::vector<char>* dstVector, wchar_t const* srcString, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-093.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [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_t srcLengthInWords, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-020.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [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_t srcLengthInWords, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-007.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [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_t srcLengthInWords, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-05e2.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0a3.adoc[utf16ToUtf8]( xref:bsl/vector-00d.adoc[bsl::vector<char>]* dstVector, unsigned short const* srcString, std::size_t srcLengthInWords, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0a3.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0a4.adoc[utf16ToUtf8]( std::pmr::vector<char>* dstVector, unsigned short const* srcString, std::size_t srcLengthInWords, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0a4.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-00e.adoc[utf16ToUtf8]( std::vector<char>* dstVector, unsigned short const* srcString, std::size_t srcLengthInWords, std::size_t* numCodePointsWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-00e.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-05f.adoc[utf16ToUtf8]( char* dstBuffer, std::size_t dstCapacity, std::u16string_view const& srcString, std::size_t* numCodePointsWritten = 0, std::size_t* numBytesWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-05f.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0d4.adoc[utf16ToUtf8]( char* dstBuffer, std::size_t dstCapacity, std::wstring_view const& srcString, std::size_t* numCodePointsWritten = 0, std::size_t* numBytesWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0d4.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0090.adoc[utf16ToUtf8]( char* dstBuffer, std::size_t dstCapacity, char16_t const* srcString, std::size_t* numCodePointsWritten = 0, std::size_t* numBytesWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0090.adoc[_» more..._]# Load, into the specified `dstBuffer` of the specified `dstCapacity`, the result of converting the specified UTF‐16 `srcString` to its UTF‐8 equivalent. Optionally specify `numCodePointsWritten`, which (if not 0) indicates the location of the modifiable variable into which the number of Unicode code points (including the terminating 0, if any) written is to be loaded, where one code point can occupy multiple bytes. Optionally specify `numBytesWritten`, which (if not 0) indicates the location of the modifiable variable into which the number of bytes written (including the null terminator, if any) is to be loaded. Optionally specify an `errorByte` to be substituted (if not 0) for invalid encodings in the input string. Invalid encodings are incomplete multi‐word encodings or parts of a two‐word encoding out of their proper sequence. If `errorByte` is 0, invalid input sequences are ignored (i.e., produce no corresponding output). Optionally specify `byteOrder` to indicate the byte order of the UTF‐16 input; if `byteOrder` is not specified, the input is assumed to be in host byte order. Return 0 on success and a bitwise‐or of the flags defined by `CharConvertStatus::Enum` otherwise. `CharConvertStatus::k_INVALID_INPUT_BIT` will be set if one or more invalid sequences were encountered in the input, and `CharConvertStatus::k_OUT_OF_SPACE_BIT` will be set if the output space was exhausted before conversion was complete. The behavior is undefined unless `dstBuffer` refers to an array of at least `dstCapacity` elements, `errorByte` is either 0 or a valid single‐byte Unicode code point (`0 < errorByte < 0x80`), and `srcString` is null‐terminated if supplied as a pointer. Note that if `dstCapacity` is 0, this function returns `CharConvertStatus::k_OUT_OF_SPACE_BIT` set and 0 is written into `*numCodePointsWritten` and `*numBytesWritten` (if those pointers are non‐null), since there is insufficient space for even a null terminator alone. Also note that since UTF‐8 is a variable‐length encoding, `numBytesWritten` may be up to four times `numCodePointsWritten`, and therefore that an input `srcString` of `dstCapacity` code points (including the terminating 0, if present) may not fit into `dstBuffer`. A one‐word (two‐byte) UTF‐16 code point will require one to three UTF‐8 octets (bytes); a two‐word (four‐byte) UTF‐16 code point will always require four UTF‐8 octets. Also note that the amount of room needed will vary with the contents of the data and the language being translated, but never will the number of bytes output exceed three times the number of words input. Also note that, if `dstCapacity > 0`, then, after completion, `strlen(dstBuffer) + 1 == *numBytesWritten`. Also note that if `srcString` is a `bslstl::StringRef`, it may contain embedded 0 words that will be translated to null bytes embedded in the output. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0813.adoc[utf16ToUtf8]( char* dstBuffer, std::size_t dstCapacity, unsigned short const* srcString, std::size_t* numCodePointsWritten = 0, std::size_t* numBytesWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0813.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-08e.adoc[utf16ToUtf8]( char* dstBuffer, std::size_t dstCapacity, wchar_t const* srcString, std::size_t* numCodePointsWritten = 0, std::size_t* numBytesWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-08e.adoc[_» more..._]# Load into the destination the UTF‐8 conversion of the UTF‐16 source. Return 0 on success and a non‐zero status otherwise. See the first `utf16ToUtf8` overload in this group for full contract details. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0b62.adoc[utf16ToUtf8]( char* dstBuffer, std::size_t dstCapacity, unsigned short const* srcString, std::size_t srcLengthInWords, std::size_t* numCodePointsWritten = 0, std::size_t* numBytesWritten = 0, char errorByte = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf16ToUtf8-0b62.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#