Cold Help System: Programming: ColdC Reference Manual: Functions: Buffer: buf_to_str()


BUFFER buf_to_str(BUFFER buf[, BUFFER sep])

This function converts the buffer specified by buf to a list of printable strings, with a final buffer element. Each string is a line in the buffer, terminated by a newline. If any characters remain unterminated, they are placed in the last element as a buffer. The last element will always be a buffer, regarless of whether any characters are in it.

buf_to_strings() will alternatively split the strings based off the optional second argument. Note: it is not necessary to specify both a carriage return and a newline as the seperator--if both exist--as the newline will be sufficient to break the string, and the carriage return will be discarded as an unprintable character in the string.


buf_replace() | buf_to_str() | buf_to_strings() | bufgraft() | buflen() | str_to_buf() | strings_to_buf() | subbuf() | bufidx()


the Cold Dark