mdz_ansi_reserve - maxdz-gmbh/mdz_string GitHub Wiki
Reserve nNewCapacity
items for string. String Size
does not change. Reservation is not made if m_pData
is attached using mdz_ansi_attachData()
mdz_bool mdz_ansi_reserve(struct mdz_Ansi* pAnsi, size_t nNewCapacity);
Parameter | Description |
---|---|
pAnsi |
pointer to string returned by mdz_ansi_create() or mdz_ansi_create_attached()
|
nNewCapacity |
new capacity in items to reserve |
Return | Description |
---|---|
mdz_false | if pAnsi == NULL
|
mdz_false | if memory allocation failed (MDZ_ERROR_ALLOCATION) |
mdz_false | if nNewCapacity > Capacity and m_pData is attached using mdz_ansi_attachData() (MDZ_ERROR_ATTACHED) |
mdz_true | if nNewCapacity <= Capacity (MDZ_ERROR_CAPACITY) |
mdz_true | reservation succeeded |