utf16ToUtf8 overloads
Synopses
Declared in <bdlde_charconvertutf16.h>
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
bsl::string* dstString,
std::u16string_view const& srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
bsl::string* dstString,
std::wstring_view const& srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
bsl::string* dstString,
char16_t const* srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Convert the UTF‐16 source to UTF‐8 in the destination.
static
int
utf16ToUtf8(
bsl::string* dstString,
unsigned short const* srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
bsl::string* dstString,
wchar_t const* srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::pmr::string* dstString,
std::u16string_view const& srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::pmr::string* dstString,
std::wstring_view const& srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::pmr::string* dstString,
char16_t const* srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::pmr::string* dstString,
unsigned short const* srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::pmr::string* dstString,
wchar_t const* srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::string* dstString,
std::u16string_view const& srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::string* dstString,
std::wstring_view const& srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::string* dstString,
char16_t const* srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::string* dstString,
unsigned short const* srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::string* dstString,
wchar_t const* srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Convert the UTF‐16 source to UTF‐8 in the destination.
static
int
utf16ToUtf8(
bsl::vector<char>* dstVector,
std::u16string_view const& srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
bsl::vector<char>* dstVector,
std::wstring_view const& srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
bsl::vector<char>* dstVector,
char16_t const* srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Convert the UTF‐16 source to UTF‐8 in the destination.
static
int
utf16ToUtf8(
bsl::vector<char>* dstVector,
unsigned short const* srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
bsl::vector<char>* dstVector,
wchar_t const* srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::pmr::vector<char>* dstVector,
std::u16string_view const& srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::pmr::vector<char>* dstVector,
std::wstring_view const& srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::pmr::vector<char>* dstVector,
char16_t const* srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::pmr::vector<char>* dstVector,
unsigned short const* srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::pmr::vector<char>* dstVector,
wchar_t const* srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::vector<char>* dstVector,
std::u16string_view const& srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::vector<char>* dstVector,
std::wstring_view const& srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::vector<char>* dstVector,
char16_t const* srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::vector<char>* dstVector,
unsigned short const* srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::vector<char>* dstVector,
wchar_t const* srcString,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
bsl::string* dstString,
unsigned short const* srcString,
std::size_t srcLengthInWords,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::pmr::string* dstString,
unsigned short const* srcString,
std::size_t srcLengthInWords,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::string* dstString,
unsigned short const* srcString,
std::size_t srcLengthInWords,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
bsl::vector<char>* dstVector,
unsigned short const* srcString,
std::size_t srcLengthInWords,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::pmr::vector<char>* dstVector,
unsigned short const* srcString,
std::size_t srcLengthInWords,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
std::vector<char>* dstVector,
unsigned short const* srcString,
std::size_t srcLengthInWords,
std::size_t* numCodePointsWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
char* dstBuffer,
std::size_t dstCapacity,
std::u16string_view const& srcString,
std::size_t* numCodePointsWritten = 0,
std::size_t* numBytesWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
char* dstBuffer,
std::size_t dstCapacity,
std::wstring_view const& srcString,
std::size_t* numCodePointsWritten = 0,
std::size_t* numBytesWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
char* dstBuffer,
std::size_t dstCapacity,
char16_t const* srcString,
std::size_t* numCodePointsWritten = 0,
std::size_t* numBytesWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Convert the UTF‐16 source to UTF‐8 in the destination.
static
int
utf16ToUtf8(
char* dstBuffer,
std::size_t dstCapacity,
unsigned short const* srcString,
std::size_t* numCodePointsWritten = 0,
std::size_t* numBytesWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
utf16ToUtf8(
char* dstBuffer,
std::size_t dstCapacity,
wchar_t const* srcString,
std::size_t* numCodePointsWritten = 0,
std::size_t* numBytesWritten = 0,
char errorByte = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Load into the destination the UTF‐8 conversion of the UTF‐16 source.
static
int
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 = '?',
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
Return Value
-
0 on success and a non‐zero status otherwise
-
0 on success and
CharConvertStatus::k_INVALID_INPUT_BITotherwise -
0 on success and a bitwise‐or of the bits specified by
CharConvertStatus::Enumotherwise
Parameters
Name |
Description |
dstString |
destination for the converted output |
srcString |
source string to convert |
numCodePointsWritten |
if non‐null, set to the code‐point count written |
errorByte |
replacement for invalid input, or 0 to skip |
byteOrder |
UTF‐16 byte order; host order if unspecified |
dstVector |
destination for the converted output |
srcLengthInWords |
number of UTF‐16 words in |
dstBuffer |
destination buffer for the converted output |
dstCapacity |
capacity of |
numBytesWritten |
if non‐null, set to the byte count written |
Created with MrDocs