Next: , Previous: Autobuf insertion, Up: Automatic buffers


11.7 Deletion from an autobuf

— Function: void abuf_zero (Autobuf *abuf)

Makes abuf be the empty buffer.

— Function: void abuf_delete (Autobuf *abuf, ssize_t index ssize_t n)

Deletes n characters from position index in sb. index must be non-negative and less than the length of abuf. n may be negative; this indicates that all characters in the string from position index onwards should be deleted. n must be small enough that no attempt is made to delete characters beyond the end of the autobuf.