BUF_ERASE(3) - Library Functions Manual
buf_erase - erase a portion of the string
#include <buf.h>
void
buf_erase(struct buf *b, size_t pos,
size_t count);
Remove count number of character in the buffer specified by b starting at pos.
It is possible to pass -1 as count parameter to remove the remaining text until the end of the string.
Undefined behavior may occur if the pos argument is outside of the buffer bounds.
libbuf(3)
The libbuf library was written by David Demelier <markand@malikania.fr>
macOS 12.5 - October 29, 2019-2022