Grow or shrink a BUF_MEM so its valid length is len.
Newly allocated capacity beyond the previous length is left uninitialized; use BUF_MEM_grow_clean() when cleared growth is required.
New length on success, or 0 on allocation failure.
| Name | Description |
|---|---|
| str | Buffer to resize. |
| len | Desired length in bytes; expands capacity when needed. |