Pike v8.1 release 6

Method Stdio.Buffer()->read_cstring()


Method read_cstring

string(8bit) read_cstring(void|int sentinel)

Description

Reads a \0 terminated C-string and returns the string excluding the terminating \0.

If there is not enough data available return UNDEFINED.

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

Parameter sentinel

A different character can be used as end sentinel of the string.

See also

_search()