NE_BUFFER(3)
πΈ NAME πΈ
ne_buffer β string buffer handling. Also hii, this is NE_BUFFER(3) from the neon API reference, and we're about to understand string buffers together, bestie πβ¨
β¨ SYNOPSIS β¨
copy this exactness, no cap:
#include <ne_string.h>
typedef struct {
char *data;
size_t used;
size_t length;
} ne_buffer;
π¦ DESCRIPTION π¦
okay so the ne_buffer type is an expandable memory buffer for holding NUL-terminated strings. slay. The data field points to the beginning of the string, and the length of that string is the used field. The current size of memory allocated is the length field. It is not recommended that the fields of a buffer are manipulated directly, bestie β like, leave them alone. Also important: the data pointer may change when the buffer is modified, so don't get attached to a pointer value, because it can literally move on you π.
A buffer is created using ne_buffer_create(3) or ne_buffer_ncreate(3), and destroyed using ne_buffer_destroy(3) or ne_buffer_finish(3). To append data to a buffer, use ne_buffer_append(3), ne_buffer_zappend(3), or ne_buffer_concat(3). those are the appending girlies β¨.
if you modify the string referenced by thedatapointer directly β instead of using one of the functions listed above βne_buffer_alteredmust be called. that's not optional, iykyk π .
π COPYRIGHT π
Copyright Β© 2001-2026 Joe Orton. the legal icon, periodt.
okay that's the whole page, bestie π«Ά source/version: neon, date: 03/20/2026, copyright: Β© 2001-2026 Joe Orton. bye and stay cute ππ
π¦ where this page comes from
- arch rolling: neon 0.37.1-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms