computeRequiredUtf8Bytes overloads
Declared in <bdlde_charconvertutf16.h>
Return the number of bytes required to store the UTF-8 translation of the specified UTF-16 srcBuffer, including the terminating null.
static
std::size_t
computeRequiredUtf8Bytes(
char16_t const* srcBuffer,
char16_t const* endPtr = 0,
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
» more...
Return the length needed in bytes, for a buffer to hold the null-terminated UTF-8 string translated from the specified UTF-16 string srcBuffer (including the terminating '0' in the returned count). Optionally specify endPtr, referring to one past the last input character. If endPtr is not supplied, or is 0, treat srcBuffer as 0 terminated. Optionally specify byteOrder indicating the byte order of srcBuffer; if byteOrder is not supplied, the host byte order is used. Note that this function will return the size utf16ToUtf8 will require, assuming the errorByte argument to utf16ToUtf8 is non-zero.
static
std::size_t
computeRequiredUtf8Bytes(
unsigned short const* srcBuffer,
unsigned short const* endPtr = 0,
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
» more...
Return the number of bytes required to store the UTF-8 translation of the specified UTF-16 srcBuffer, including the terminating null.
static
std::size_t
computeRequiredUtf8Bytes(
wchar_t const* srcBuffer,
wchar_t const* endPtr = 0,
ByteOrder::Enum byteOrder = ByteOrder::e_HOST);
» more...