-
Notifications
You must be signed in to change notification settings - Fork 0
mdz_wchar_insertWchar_async
Maksym Dzyubenko edited this page Feb 7, 2024
·
1 revision
Insert nCount
"wide"-characters pwcItems
in string. Size
grows on nCount
. Length
grows on symbols count.
String reserved area and pwcItems
should not overlap.
mdz_bool mdz_wchar_insertWchar_async(
struct mdz_Wchar* pWchar,
size_t nLeftPos,
const wchar_t* pwcItems,
size_t nCount,
size_t nWcharSize,
mdz_bool bReserve,
struct mdz_asyncData* pAsyncData);
Synchronous version:
mdz_wchar_insertWchar(pWchar, nLeftPos, pwcItems, nCount, nWcharSize, bReserve);
Parameter | Description |
---|---|
pWchar |
pointer to string returned by mdz_wchar_create() or mdz_wchar_create_attached()
|
nLeftPos |
0-based position to insert in symbols. "surrogate pairs" count as 1 symbol. If nLeftPos == Length or -1, items are appended. nLeftPos > Length is not allowed |
pwcItems |
"wide"-characters to insert |
nCount |
number of "wide"-characters to insert |
nWcharSize |
size of pwcItems wchar_t character in bytes |
bReserve |
if mdz_true reserve capacity when there is not enough space for insertion, otherwise mdz_false |
pAsyncData |
pointer to shared async data for asynchronous call, or NULL if call should be synchronous |
Return | Description |
---|---|
mdz_false | if pWchar == NULL
|
mdz_false | if bReserve == mdz_true and memory allocation failed (MDZ_ERROR_ALLOCATION) |
mdz_false | if nWcharSize is not 2 or 4 (MDZ_ERROR_WCHAR_SIZE) |
mdz_false | if bReserve == mdz_true and there is not enough capacity for inserted data, but m_pData is attached using mdz_wchar_attachData() (MDZ_ERROR_ATTACHED) |
mdz_false | if bReserve == mdz_false and there is not enough free Capacity in the string (MDZ_ERROR_CAPACITY) |
mdz_false | if pwcItems contain invalid "wide"-character(s) (MDZ_ERROR_CONTENT) |
mdz_false | if string reserved area and pwcItems overlap (MDZ_ERROR_OVERLAP) |
mdz_true | if pwcItems == NULL (MDZ_ERROR_ITEMS), or nCount == 0 (MDZ_ERROR_ZEROCOUNT), or nLeftPos > Length (MDZ_ERROR_BIGLEFT). No insertion is made |
mdz_true | insertion succeeded |
mdz_wchar API Reference is generated using mdzApiRefGenerator.
mdz_string functions
- Init functions
mdz_ansi functions
- Init and destroy functions
- Reserve capacity functions
- Insert/remove functions
- Find functions
- Miscellaneous functions
mdz_utf8 functions
- Init and destroy functions
- Reserve capacity functions
- Insert/remove functions
- mdz_utf8_insertUtf8_async
- mdz_utf8_insertUtf8_string_async
- mdz_utf8_insertAnsi_async
- mdz_utf8_insertAnsi_string_async
- mdz_utf8_insertWchar_async
- mdz_utf8_insertWchar_string_async
- mdz_utf8_insertUtf16_async
- mdz_utf8_insertUtf16_string_async
- mdz_utf8_insertUtf32_async
- mdz_utf8_insertUtf32_string_async
mdz_wchar functions
- Init and destroy functions
- Reserve capacity functions
- Insert/remove functions
- mdz_wchar_insertWchar_async
- mdz_wchar_insertWchar_string_async
- mdz_wchar_insertAnsi_async
- mdz_wchar_insertAnsi_string_async
- mdz_wchar_insertUtf8_async
- mdz_wchar_insertUtf8_string_async
- mdz_wchar_insertUtf16_async
- mdz_wchar_insertUtf16_string_async
- mdz_wchar_insertUtf32_async
- mdz_wchar_insertUtf32_string_async
mdz_utf16 functions
- Init and destroy functions
- Reserve capacity functions
- Insert/remove functions
- mdz_utf16_insertUtf16_async
- mdz_utf16_insertUtf16_string_async
- mdz_utf16_insertAnsi_async
- mdz_utf16_insertAnsi_string_async
- mdz_utf16_insertWchar_async
- mdz_utf16_insertWchar_string_async
- mdz_utf16_insertUtf8_async
- mdz_utf16_insertUtf8_string_async
- mdz_utf16_insertUtf32_async
- mdz_utf16_insertUtf32_string_async
mdz_utf32 functions
- Init and destroy functions
- Reserve capacity functions
- Insert/remove functions
- mdz_utf32_insertUtf32_async
- mdz_utf32_insertUtf32_string_async
- mdz_utf32_insertAnsi_async
- mdz_utf32_insertAnsi_string_async
- mdz_utf32_insertWchar_async
- mdz_utf32_insertWchar_string_async
- mdz_utf32_insertUtf8_async
- mdz_utf32_insertUtf8_string_async
- mdz_utf32_insertUtf16_async
- mdz_utf32_insertUtf16_string_async