mdz_ansi_findSingle_async - maxdz-gmbh/mdz_string GitHub Wiki

Find first occurrence of cItem 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_findSingle_async(
  const struct mdz_Ansi* pAnsi,
  size_t nLeftPos,
  size_t nRightPos,
  char cItem,
  struct mdz_asyncData* pAsyncData);

Synchronous version:
mdz_ansi_findSingle(pAnsi, nLeftPos, nRightPos, cItem);

Parameter Description
pAnsi pointer to string returned by mdz_ansi_create() or mdz_ansi_create_attached()
nLeftPos 0-based start position to search from left. Use 0 to search from the beginning of string
nRightPos 0-based end position to search up to. Use Size-1 or -1 to search till the end of string
cItem character to find
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 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.
⚠️ **GitHub.com Fallback** ⚠️