Set length

From Kolmafia
Revision as of 04:19, 7 May 2010 by imported>Bale
Jump to navigation Jump to search
needs(code_samples);

Function Syntax

void set_length(buffer original ,int length )

  • original is the buffer to modify
  • length is the new length of the buffer

Changes the size of the buffer. Primarily this is used to truncate the buffer by setting a new length shorter than the current length, deleting all the characters past that length. If the new length is longer than the old length, the buffer will be padded with null characters: \u0000. Those character can cause trouble, so only use set_length to truncate.

See Also

delete() | insert() | length()