Clib Set Memory Method

The Clib Set Memory method sets the bytes in a buffer to a character that you specify.

Format

Clib.memset(bufferVar, char[, length])

The following table describes the arguments for the Clib Set Memory method.

Argument Description

bufferVar

The name of a buffer or a variable that references a buffer. If this buffer does not exist, then this method creates it.

char

The character to which this method sets the bytes of the buffer.

length

The number of bytes that this method writes. This method does one of the following:

  • If the buffer is shorter than the value you specify in the length argument, then it increases the size of this buffer so that the size is equal to the value in the length argument.

  • If you do not specify the length argument, then it sets the length argument to the size of the buffer, starting at position 0.