[#BloombergLP-bdlde-CharConvertUtf16-utf8ToUtf16-014] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlde.adoc[bdlde]::xref:BloombergLP/bdlde/CharConvertUtf16.adoc[CharConvertUtf16]::utf8ToUtf16 :relfileprefix: ../../../ :mrdocs: `utf8ToUtf16` overloads == Synopses Declared in `<bdlde_charconvertutf16.h>` Load into the destination the UTF‐16 conversion of the UTF‐8 source. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-06.adoc[utf8ToUtf16]( xref:bsl/u16string.adoc[bsl::u16string]* dstString, std::string_view const& srcString, std::size_t* numCodePointsWritten = 0, char16_t errorChar = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-06.adoc[_» more..._]# Load into the destination the UTF‐16 conversion of the UTF‐8 source. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0101.adoc[utf8ToUtf16]( xref:bsl/u16string.adoc[bsl::u16string]* dstString, char const* srcString, std::size_t* numCodePointsWritten = 0, char16_t errorChar = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0101.adoc[_» more..._]# Load into the destination the UTF‐16 conversion of the UTF‐8 source. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-09.adoc[utf8ToUtf16]( std::pmr::u16string* dstString, std::string_view const& srcString, std::size_t* numCodePointsWritten = 0, char16_t errorChar = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-09.adoc[_» more..._]# Load into the destination the UTF‐16 conversion of the UTF‐8 source. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0106.adoc[utf8ToUtf16]( std::pmr::u16string* dstString, char const* srcString, std::size_t* numCodePointsWritten = 0, char16_t errorChar = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0106.adoc[_» more..._]# Load into the destination the UTF‐16 conversion of the UTF‐8 source. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0e5.adoc[utf8ToUtf16]( std::u16string* dstString, std::string_view const& srcString, std::size_t* numCodePointsWritten = 0, char16_t errorChar = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0e5.adoc[_» more..._]# Load into the destination the UTF‐16 conversion of the UTF‐8 source. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0dc8.adoc[utf8ToUtf16]( std::u16string* dstString, char const* srcString, std::size_t* numCodePointsWritten = 0, char16_t errorChar = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0dc8.adoc[_» more..._]# Convert the UTF‐8 source to UTF‐16 in the destination. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-04.adoc[utf8ToUtf16]( xref:bsl/wstring.adoc[bsl::wstring]* dstString, std::string_view const& srcString, std::size_t* numCodePointsWritten = 0, wchar_t errorWord = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-04.adoc[_» more..._]# Load into the destination the UTF‐16 conversion of the UTF‐8 source. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0dca.adoc[utf8ToUtf16]( xref:bsl/wstring.adoc[bsl::wstring]* dstString, char const* srcString, std::size_t* numCodePointsWritten = 0, wchar_t errorWord = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0dca.adoc[_» more..._]# Load into the destination the UTF‐16 conversion of the UTF‐8 source. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-083.adoc[utf8ToUtf16]( std::pmr::wstring* dstString, std::string_view const& srcString, std::size_t* numCodePointsWritten = 0, wchar_t errorWord = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-083.adoc[_» more..._]# Load into the destination the UTF‐16 conversion of the UTF‐8 source. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0f.adoc[utf8ToUtf16]( std::pmr::wstring* dstString, char const* srcString, std::size_t* numCodePointsWritten = 0, wchar_t errorWord = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0f.adoc[_» more..._]# Load into the destination the UTF‐16 conversion of the UTF‐8 source. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0e3.adoc[utf8ToUtf16]( std::wstring* dstString, std::string_view const& srcString, std::size_t* numCodePointsWritten = 0, wchar_t errorWord = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0e3.adoc[_» more..._]# Load into the destination the UTF‐16 conversion of the UTF‐8 source. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0b2.adoc[utf8ToUtf16]( std::wstring* dstString, char const* srcString, std::size_t* numCodePointsWritten = 0, wchar_t errorWord = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0b2.adoc[_» more..._]# Convert the UTF‐8 source to UTF‐16 in the destination. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0b9.adoc[utf8ToUtf16]( xref:bsl/vector-00d.adoc[bsl::vector<unsigned short>]* dstVector, std::string_view const& srcString, std::size_t* numCodePointsWritten = 0, unsigned short errorWord = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0b9.adoc[_» more..._]# Load into the destination the UTF‐16 conversion of the UTF‐8 source. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-00.adoc[utf8ToUtf16]( xref:bsl/vector-00d.adoc[bsl::vector<unsigned short>]* dstVector, char const* srcString, std::size_t* numCodePointsWritten = 0, unsigned short errorWord = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-00.adoc[_» more..._]# Load into the destination the UTF‐16 conversion of the UTF‐8 source. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0cf.adoc[utf8ToUtf16]( std::pmr::vector<unsigned short>* dstVector, std::string_view const& srcString, std::size_t* numCodePointsWritten = 0, unsigned short errorWord = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0cf.adoc[_» more..._]# Load into the destination the UTF‐16 conversion of the UTF‐8 source. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-087.adoc[utf8ToUtf16]( std::pmr::vector<unsigned short>* dstVector, char const* srcString, std::size_t* numCodePointsWritten = 0, unsigned short errorWord = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-087.adoc[_» more..._]# Load into the destination the UTF‐16 conversion of the UTF‐8 source. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-019.adoc[utf8ToUtf16]( std::vector<unsigned short>* dstVector, std::string_view const& srcString, std::size_t* numCodePointsWritten = 0, unsigned short errorWord = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-019.adoc[_» more..._]# Load into the destination the UTF‐16 conversion of the UTF‐8 source. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-071.adoc[utf8ToUtf16]( std::vector<unsigned short>* dstVector, char const* srcString, std::size_t* numCodePointsWritten = 0, unsigned short errorWord = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-071.adoc[_» more..._]# Convert the UTF‐8 source to UTF‐16 in the destination. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-079.adoc[utf8ToUtf16]( char16_t* dstBuffer, std::size_t dstCapacity, std::string_view const& srcString, std::size_t* numCodePointsWritten = 0, std::size_t* numWordsWritten = 0, char16_t errorChar = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-079.adoc[_» more..._]# Load into the destination the UTF‐16 conversion of the UTF‐8 source. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-07a.adoc[utf8ToUtf16]( char16_t* dstBuffer, std::size_t dstCapacity, char const* srcString, std::size_t* numCodePointsWritten = 0, std::size_t* numWordsWritten = 0, char16_t errorChar = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-07a.adoc[_» more..._]# Convert the UTF‐8 source to UTF‐16 in the destination. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0ec.adoc[utf8ToUtf16]( unsigned short* dstBuffer, std::size_t dstCapacity, std::string_view const& srcString, std::size_t* numCodePointsWritten = 0, std::size_t* numWordsWritten = 0, unsigned short errorWord = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0ec.adoc[_» more..._]# Load into the destination the UTF‐16 conversion of the UTF‐8 source. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0c1.adoc[utf8ToUtf16]( unsigned short* dstBuffer, std::size_t dstCapacity, char const* srcString, std::size_t* numCodePointsWritten = 0, std::size_t* numWordsWritten = 0, unsigned short errorWord = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0c1.adoc[_» more..._]# Load into the destination the UTF‐16 conversion of the UTF‐8 source. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0e4.adoc[utf8ToUtf16]( wchar_t* dstBuffer, std::size_t dstCapacity, std::string_view const& srcString, std::size_t* numCodePointsWritten = 0, std::size_t* numWordsWritten = 0, wchar_t errorWord = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-0e4.adoc[_» more..._]# Load into the destination the UTF‐16 conversion of the UTF‐8 source. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-05.adoc[utf8ToUtf16]( wchar_t* dstBuffer, std::size_t dstCapacity, char const* srcString, std::size_t* numCodePointsWritten = 0, std::size_t* numWordsWritten = 0, wchar_t errorWord = '?', xref:BloombergLP/bdlde/ByteOrder/Enum.adoc[ByteOrder::Enum] byteOrder = ByteOrder::e_HOST); ---- [.small]#xref:BloombergLP/bdlde/CharConvertUtf16/utf8ToUtf16-05.adoc[_» more..._]# == Return Value * 0 on success and a non‐zero status otherwise * 0 on success and `CharConvertStatus::k_INVALID_INPUT_BIT` otherwise * 0 on success and a bitwise‐or of the bits specified by `CharConvertStatus::Enum` otherwise == Parameters [cols="1,4"] |=== | Name| Description | *dstString* | destination for the converted output | *srcString* | source string to convert | *numCodePointsWritten* | if non‐null, set to the code‐point count written | *errorChar* | replacement for invalid input, or 0 to skip | *byteOrder* | UTF‐16 byte order; host order if unspecified | *errorWord* | replacement for invalid input, or 0 to skip | *dstVector* | destination for the converted output | *dstBuffer* | destination buffer for the converted output | *dstCapacity* | capacity of `dstBuffer` in elements | *numWordsWritten* | if non‐null, set to the word count written |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#