Skip to content

mdz_vector_remove

maxdz-gmbh edited this page Apr 29, 2021 · 2 revisions

Remove all occurrences of nCount item(s) matching to pItems, residing between nLeftPos and nRightPos. Vector m_pData and pItems cannot overlap. After remove(s) Capacity doesn't change, Size decreases on nCount of removed items.

mdz_bool mdz_vector_remove(
  struct mdz_Vector* pVector,
  size_t nLeftPos,
  size_t nRightPos,
  const void* pItems,
  size_t nCount);

Parameter Description
pVector pointer to vector returned by mdz_vector_create() or mdz_vector_create_attached()
nLeftPos 0-based start position to remove item(s) from. Use 0 to search from the beginning of vector
nRightPos 0-based end position to remove item(s) up to. Use Size-1 to search till the end of vector
pItems pointer to items to remove. If NULL, value type of NULL (normally 0) nCount times, will be used for search
nCount number of item(s) to remove
Return Description
mdz_false if pVector == NULL
mdz_true if nCount == 0 (MDZ_ERROR_ZEROCOUNT), or nLeftPos > nRightPos (MDZ_ERROR_BIGLEFT), or nRightPos >= Size (MDZ_ERROR_BIGRIGHT), or nCount is too big (MDZ_ERROR_BIGCOUNT). No removes are made
mdz_true operation succeeded
mdz_vector API Reference is generated using mdzApiRefGenerator.
Clone this wiki locally