Set length

From Kolmafia
Revision as of 09:46, 6 May 2010 by imported>Bale (Created page with '{{ #vardefine:name|set_length}}{{ #vardefine:return_type|void}}{{ FunctionPage| name={{#var:name}}| function_category=String Handling Routines| function1={{Function| name={{#va…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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. If the new length is less than the current length, then the buffer is truncated, losing all characters past that length.

See Also

delete() | insert() | length()