-
Notifications
You must be signed in to change notification settings - Fork 0
mdz_ansi_attachData
Maksym Dzyubenko edited this page Feb 7, 2024
·
1 revision
Attach pre-allocated data to string, assigning pcData to m_pData
. If attached, m_pData
will not be destroyed in mdz_ansi_destroy()
mdz_bool mdz_ansi_attachData(
struct mdz_Ansi* pAnsi,
const char* pData,
size_t nOffsetFromStart,
size_t nCapacity,
enum mdz_attach_type enAttachType);
Parameter | Description |
---|---|
pAnsi |
pointer to string returned by mdz_ansi_create() or mdz_ansi_create_attached()
|
pData |
pointer to pre-allocated data to attach |
nOffsetFromStart |
position in pre-allocated data to attach from. Can be > 0 |
nCapacity |
full capacity of pre-allocated data in items |
enAttachType |
type of attachment. 0 is expected at position pData [nOffsetFromStart ] if MDZ_ATTACH_ZEROSIZE . 0 is expected at position pData [nCapacity - 1] if MDZ_ATTACH_SIZE_TERMINATOR
|
Return | Description |
---|---|
mdz_false | if pAnsi == NULL
|
mdz_false | if pData == NULL (MDZ_ERROR_DATA), or nOffsetFromStart >= nCapacity (MDZ_ERROR_OFFSET) |
mdz_false | if enAttachType is MDZ_ATTACH_ZEROSIZE or MDZ_ATTACH_SIZE_TERMINATOR but 0 is not found at expected position (MDZ_ERROR_ATTACH_TERMINATOR) |
mdz_true | operation succeeded |
mdz_ansi 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