BfReadString

Last Updated2007-12-03
Created At2007-03-11

Reads a string from a readable bitbuffer (bf_read).

native int BfReadString(Handle bf, char[] buffer, int maxlength, bool line = false)

Parameters

bf_read handle to read from.
char[] buffer
Destination string buffer.
int maxlength
Maximum length of output string buffer.
bool line
If true the buffer will be copied until it reaches a '\n' or a null terminator.

Return Value

int Number of bytes written to the buffer. If the bitbuffer stream overflowed, that is, had no terminator before the end of the stream, then a negative number will be returned equal to the number of characters written to the buffer minus 1. The buffer will be null terminated regardless of the return value.

Error

Invalid or incorrect Handle.