gbuffer_append_string()

gbuffer_append_string()#

gbuffer_append_string() appends a null-terminated string to the given gbuffer_t buffer, increasing its size if necessary.

Prototype

size_t gbuffer_append_string(
    gbuffer_t *gbuf,
    const char *s
);

Parameters

Key

Type

Description

gbuf

gbuffer_t *

Pointer to the gbuffer_t buffer where the string will be appended.

s

const char *

Null-terminated string to append to the buffer.


Return Value

Returns the number of bytes successfully appended to the buffer.

Notes

If the buffer does not have enough space, it will be reallocated to accommodate the new data.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples