Skip to content

mdz_ansi_lastOf_async

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

Find last occurrence of any item of pcItems in string. Returns 0-based position of match (if found), or string Size if not found, or SIZE_MAX if error.

size_t mdz_ansi_lastOf_async(
  const struct mdz_Ansi* pAnsi,
  size_t nLeftPos,
  size_t nRightPos,
  const char* pcItems,
  size_t nCount,
  struct mdz_asyncData* pAsyncData);

Synchronous version:
mdz_ansi_lastOf(pAnsi, nLeftPos, nRightPos, pcItems, nCount);

Parameter Description
pAnsi pointer to string returned by mdz_ansi_create() or mdz_ansi_create_attached()
nLeftPos 0-based end position to search up to. Use 0 to search till the beginning of string
nRightPos 0-based start position to search from right. Use Size-1 or -1 to serch from the end of string
pcItems pointer to items to find
nCount number of items to find or 0 if pcItems until 0-terminator should be used
pAsyncData pointer to shared async data for asynchronous call, or NULL if call should be synchronous
Return Description
SIZE_MAX if pAnsi == NULL
Size if pcItems == NULL (MDZ_ERROR_ITEMS), or nCount == 0 and pcItems[0] == 0 (MDZ_ERROR_ZEROCOUNT), or nLeftPos > nRightPos (MDZ_ERROR_BIGLEFT), or nRightPos >= Size (MDZ_ERROR_BIGRIGHT). No search is made
Size if item(s) not found
Result 0-based position of first match
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