TBUF(3pub) TBUF(3pub)
NAME
tbuf_create, tbuf_destroy, tbuf_copy, tbuf_cat, tbuf_length, tbuf_chars - manipulate text editor buffer
SYNOPSIS
#include <publib.h>
Tbuf *tbuf_create(const char *chars, size_t len);
void tbuf_destroy(Tbuf *tbuf);
Tbuf *tbuf_copy(Tbuf *tbuf, size_t offset, size_tlen);
Tbuf *tbuf_cat(Tbuf *tbuf, Tbuf * tbuf);
size_t tbuf_length(Tbuf *tbuf);
void tbuf_chars(char *chars, Tbuf *tbuf, size_t offset, size_t len);
DESCRIPTION
These routines create and manipulate simple text editor buffers, which can also be thought of as arbitrarily large text strings. The buf-
fers are one-dimensional (i.e., not automatically divided into lines), and are indexed with character offsets. They are 8-bit and binary
clean, i.e., they may contain any 8-bit characters, including the zero byte ('