utf8ToUcs2 overloads
Declared in <bdlde_charconvertucs2.h>
Load into result the UCS-2 conversion of the null-terminated UTF-8 srcString.
static
int
utf8ToUcs2(
bsl::vector<unsigned short>* result,
char const* srcString,
unsigned short errorCharacter = '?');
» more...
Load into result the UCS-2 conversion of the null-terminated UTF-8 srcString.
static
int
utf8ToUcs2(
std::pmr::vector<unsigned short>* result,
char const* srcString,
unsigned short errorCharacter = '?');
» more...
Load into result the UCS-2 conversion of the null-terminated UTF-8 srcString.
static
int
utf8ToUcs2(
std::vector<unsigned short>* result,
char const* srcString,
unsigned short errorCharacter = '?');
» more...
Convert a null-terminated UTF-8 string to UCS-2 in a fixed buffer.
static
int
utf8ToUcs2(
unsigned short* dstBuffer,
std::size_t dstCapacity,
char const* srcString,
std::size_t* numCharsWritten = 0,
unsigned short errorCharacter = '?');
» more...
CharConvertStatus::k_INVALID_INPUT_BIT otherwiseCharConvertStatus::Enum otherwise| Name | Description |
|---|---|
| result | output vector for the UCS-2 conversion |
| srcString | null-terminated UTF-8 input |
| errorCharacter | substitute for invalid input; 0 skips them |
| dstBuffer | output buffer for the UCS-2 conversion |
| dstCapacity | capacity of dstBuffer in unsigned shorts |
| numCharsWritten | if non-null, receives character count written |