Rechercher une page de manuel
ne_buffer_append
Langue: en
Version: 25 February 2009 (fedora - 06/07/09)
Section: 3 (Bibliothèques de fonctions)
Synopsis
#include <ne_string.h>
- void ne_buffer_append(ne_buffer *buf, const char *string, size_t len);
- void ne_buffer_zappend(ne_buffer *buf, const char *string);
- void ne_buffer_concat(ne_buffer *buf, const char *str, ...);
Description
- The ne_buffer_append and ne_buffer_zappend functions append a string to the end of a buffer; extending the buffer as necessary. The len passed to ne_buffer_append specifies the length of the string to append; there must be no FCNULF[] terminator in the first len bytes of the string. ne_buffer_zappend must be passed a FCNULF[]-terminated string.
The ne_buffer_concat function takes a variable-length argument list following str; each argument must be a char * pointer to a FCNULF[]-terminated string. A FCNULLF[] pointer must be given as the last argument to mark the end of the list. The strings (including str) are appended to the buffer in the order given. None of the strings passed to ne_buffer_concat are modified.
Examples
The following code will output "FCHello, world. And goodbye.F[]".
-
ne_buffer *buf = ne_buffer_create(); ne_buffer_zappend(buf, "Hello"); ne_buffer_concat(buf, ", world. ", "And ", "goodbye.", NULL); puts(buf->data); ne_buffer_destroy(buf);
See also
ne_buffer, ne_buffer_create, ne_buffer_destroy
Author
Joe Orton <neon@lists.manyfish.co.uk>
- Author.
Copyright
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre