Pike v8.0 release 1738

Method Stdio.Buffer()->read_hstring()


Method read_hstring

string(8bit) read_hstring(int(0..) n, void|int offset)

Description

Identical in functionality to read(read_number(n)) but faster.

Read a network byte order number of size n*8 bits, then return the indicated number of bytes as a string.

offset is substracted from the specified length prior to reading the string. Typical usage involves substracting n to account for the room used by the size.

If there is not enough data available return 0.

Note that pike string can not be longer than 0x7fffffff bytes (~2Gb).