Skip to content

mdz_ansi_16_trimLeft

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

Remove items which are contained in pcItems from left, until first non-contained in pcItems item is reached.

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

Parameter Description
psAnsi pointer to string returned by mdz_ansi_16_attach()
nLeftPos 0-based start position to trim item(s) from left. Use 0 to trim from the beginning of Data
nRightPos 0-based end position to trim item(s) up to. Use Size-1 to trim till the end of Data
pcItems items to trim. Cannot be NULL
nCount number of items to trim. Cannot be 0
Return 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_ZERO_SIZE Size is 0 (string is empty)
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
mdz_ansi_16 API Reference is generated using mdzApiRefGenerator.