Pike v8.1 release 6

Method Stdio.Buffer()->truncate()


Method truncate

int(0..)|int(-1..-1) truncate(int(0..) n)

Description

Truncates the buffer to a length of n bytes.

Returns -1 on error and the number of bytes removed otherwise.