Skip to content

mdz_ansi_copySubAnsiFrom_async

Maksym Dzyubenko edited this page Feb 7, 2024 · 1 revision

Fills pSubAnsi with items from pAnsi, starting from nLeftPos and containing nCount items.

size_t mdz_ansi_copySubAnsiFrom_async(
  const struct mdz_Ansi* pAnsi,
  size_t nLeftPos,
  size_t nCount,
  struct mdz_Ansi* pSubAnsi,
  struct mdz_asyncData* pAsyncData);

Synchronous version:
mdz_ansi_copySubAnsiFrom(pAnsi, nLeftPos, nCount, pSubAnsi);

Parameter Description
pAnsi pointer to string returned by mdz_ansi_create() or mdz_ansi_create_attached()
nLeftPos 0-based start position to get items from. Use 0 to start from the beginning of string
nCount number of items to copy or 0 if pcItems until 0-terminator should be used
pSubAnsi pointer to string where items should be copied. Data in pSubAnsi will be re-reserved to appropriate size if necessary
pAsyncData pointer to shared async data for asynchronous call, or NULL if call should be synchronous
Return Description
SIZE_MAX if pAnsi == NULL, or pSubAnsi == NULL (MDZ_ERROR_SUBCONTAINER), or reallocation of m_pData in pSubAnsi was necessary but failed (MDZ_ERROR_ALLOCATION)
Size if nCount == 0 and pcItems[0] == 0 (MDZ_ERROR_ZEROCOUNT), or nCount is too big (MDZ_ERROR_BIGCOUNT), or nLeftPos + nCount > Size (MDZ_ERROR_BIGLEFT). No copying is made
Result 0-based position after copied data, or Size if copied until the end of pAnsi
mdz_ansi API Reference is generated using mdzApiRefGenerator.

mdz_string functions

mdz_ansi functions

mdz_utf8 functions

mdz_wchar functions

mdz_utf16 functions

mdz_utf32 functions

mdz_string API Reference is generated using mdzApiRefGenerator.
Clone this wiki locally