Method _Stdio.Buffer()->read_buffer()


Method read_buffer

Buffer read_buffer(int(0..) n)
Buffer read_buffer(int(0..) n, bool copy)

Description

Same as read, but returns the result as an Buffer.

No data is copied unless copy is specified and true, the new buffer points into the old one.

Note

As long as the subbuffer exists the main buffer is locked in memory.

Usually this is OK, since it often represents something that should be parsed before the next whatever is extracted from the buffer, but do take care.