buffer_resize

This function resizes a given buffer to the size (in bytes) that you specify.

 

Syntax:

buffer_resize(buffer, newsize);

ArgumentTypeDescription
bufferBufferThe buffer to change the size of.
newsizeRealThe new size of the buffer (in bytes).

 

Returns:

N/A

 

Example:

if (buffer_get_size(buff) < 16384)
{
    buffer_resize(buff, 16384);
}

The above code checks the size of the buffer stored in the variable buff. If it's less than the given value, the buffer is resized.