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


BUFFER subbuf(BUFFER buf, INTEGER start[, INTEGER length])

This function returns a subrange of the buffer specified by buf. The subrange starts at position start, and continues length characters. If length is unspecified, it will continue to the end of the buffer. If start is outside of the range of the buffer, or length will extend past the end of the buffer, the error ~range is thrown. Example:

subbuf(`[1, 2, 3, 4], 2, 2)
=> `[2, 3]


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


the Cold Dark