---
name: "ne_buffer_clear"
section: "3"
platform: "linux"
package: "neon"
version: "0.37.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ne_buffer_clear"
---

# ne\_buffer\_clear(3)

clear, grow, or mark as altered a string buffer

## NAME

ne\_buffer\_clear, ne\_buffer\_grow, ne\_buffer\_altered - clear, grow, or mark as altered a string buffer

## SYNOPSIS

```
#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***);**

## DESCRIPTION

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_append/3.md), [**ne\_buffer\_zappend**(3)](/ne_buffer_zappend/3.md) or [**ne\_buffer\_concat**(3)](/ne_buffer_concat/3.md).

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.

## COPYRIGHT

Copyright © 2001-2026 Joe Orton\
