ne_buffer_clear(3)

ne_buffer_clear3

Clear, grow, or mark as altered a string buffer

Usage

#include <ne_string.h>

void ne_buffer_clear(ne_buffer *buf);

void ne_buffer_altered(ne_buffer *buf);

void ne_buffer_grow(ne_buffer *buf, size_t size);

Overview

The ne_buffer_clear function sets the string stored in buf to be the empty string ("").

The ne_buffer_altered function must be used after the string stored in the buffer buf is modified by directly rather than using ne_buffer_append(3), ne_buffer_zappend(3) or ne_buffer_concat(3).

The ne_buffer_grow function ensures that at least size bytes are allocated for the string; this can be used if a large amount of data is going to be appended to the buffer and may result in more efficient memory allocation.

Releases

11 releases since Debian 4.0 (Etch); the text changed 9 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9–10
  7. 11
  8. 12
  9. 13
  10. Arch

From neon 0.37.1-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.