BUF_ERASE(3) - Library Functions Manual

NAME

buf_erase - erase a portion of the string

SYNOPSIS

#include <buf.h>

void
buf_erase(struct buf *b, size_t pos, size_t count);

DESCRIPTION

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.

SEE ALSO

libbuf(3)

AUTHORS

The libbuf library was written by David Demelier <markand@malikania.fr>

macOS 13.5 - October 29, 2019-2022