Grow or shrink a BUF_MEM buffer, zeroing any released or newly unused bytes.
Like BUF_MEM_grow(), but clears freed trailing data and newly allocated unused space.
New length on success, or 0 on allocation failure.
| Name | Description |
|---|---|
| str | Buffer to resize. |
| len | Desired length in bytes. |