-
Notifications
You must be signed in to change notification settings - Fork 0
mdz_ansi_alg_remove
Maksym Dzyubenko edited this page Oct 6, 2024
·
3 revisions
Remove all ocurrences of nCount
item(s) matching to pcItems
, residing between nLeftPos
and nRightPos
enum mdz_error mdz_ansi_alg_remove(
char* pcData,
size_t* pnDataSize,
size_t nLeftPos,
size_t nRightPos,
const char* pcItems,
size_t nCount,
mdz_bool bFromLeft);
Parameter | Description |
---|---|
pcData |
pointer to string. It should end with 0-terminator |
pnDataSize |
pointer to current Size . If removal succeed, new size is returned here |
nLeftPos |
0-based start position to remove item(s) from. Use 0 to search from the beginning of string |
nRightPos |
0-based end position to remove item(s) up to. Use Size-1 to search till the end of string |
pcItems |
items to remove. Cannot be NULL
|
nCount |
number of item(s) to remove. Cannot be 0 |
bFromLeft |
mdz_true if search for items to remove from left side, otherwise from right |
Return | Description |
---|---|
MDZ_ERROR_LICENSE | license is not initialized using mdz_ansi_alg_init() or invalid |
MDZ_ERROR_DATA |
pcData is NULL
|
MDZ_ERROR_SIZE |
pnDataSize is NULL
|
MDZ_ERROR_ZERO_SIZE |
Size is 0 (string is empty) |
MDZ_ERROR_TERMINATOR | there is no 0-terminator in the end of pcData ([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_BIG_COUNT |
nCount is bigger than search area (between nLeftPos and nRightPos ) |
MDZ_ERROR_NONE | function succeeded, new size is written in pnDataSize
|
mdz_ansi_alg API Reference is generated using mdzApiRefGenerator.
mdz_ansi_alg functions
- Init functions
- Insert/remove functions
- Find functions
- Miscellaneous functions