gbuffer_printf()
#
The function gbuffer_printf()
appends formatted text to a gbuffer_t *
buffer using a printf
-style format string and arguments.
Prototype
int gbuffer_printf(
gbuffer_t *gbuf,
const char *format,
...
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
Pointer to the |
|
|
A |
|
|
Additional arguments corresponding to the format specifiers in |
Return Value
Returns the number of bytes written to the buffer. If an error occurs, it returns 0
.
Notes
If the buffer does not have enough space, it attempts to reallocate memory. If reallocation fails, the function logs an error and returns 0
.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples