---
name: "ne_buffer_grow"
section: "3"
platform: "linux"
package: "libneon27-dev"
version: "0.34.2-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ne_buffer_clear"
---

# ne\_buffer\_grow(3)

clear, grow, or mark as altered a string buffer

Part of [ne\_buffer\_clear(3)](/ne_buffer_clear/3.md).

## 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, ne\_buffer\_zappend or ne\_buffer\_concat.

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-2024 Joe Orton\
