Skip to content

mdz_ansi_16_lastNotOf

Maksym Dzyubenko edited this page Oct 6, 2024 · 2 revisions

Find last non-occurrence of any item of pcItems. Returns 0-based position of match (if found), or SIZE_MAX if not found or error happened. If penError is not NULL, error will be written there

size_t mdz_ansi_16_lastNotOf(
  const mdz_Ansi16* psAnsi,
  size_t nLeftPos,
  size_t nRightPos,
  const char* pcItems,
  size_t nCount,
  enum mdz_error* penError);

Parameter Description
psAnsi pointer to string returned by mdz_ansi_16_attach()
nLeftPos 0-based end position to find up to. Use 0 to search till the beginning of Data
nRightPos 0-based start position to find from right. Use Size-1 to search till the end of Data
pcItems items to find. Cannot be NULL
nCount number of items to find. Cannot be 0
penError if not NULL, error will be written there. There are following errors possible:
Value Description
MDZ_ERROR_LICENSE license is not initialized using mdz_ansi_16_init() or invalid
MDZ_ERROR_DATA psAnsi is NULL
MDZ_ERROR_CAPACITY Capacity is too large
MDZ_ERROR_BIG_SIZE Size > Capacity
MDZ_ERROR_TERMINATOR there is no 0-terminator on Data[Size] position
MDZ_ERROR_ITEMS pcItems is NULL
MDZ_ERROR_ZERO_COUNT nCount is 0
MDZ_ERROR_BIG_RIGHT nRightPos >= Size
MDZ_ERROR_BIG_LEFT nLeftPos > nRightPos
MDZ_ERROR_NONE function succeeded
Return Description
SIZE_MAX if no item of pcItems found or error happened
Result 0-based position of first match
mdz_ansi_16 API Reference is generated using mdzApiRefGenerator.