1NE_BUFFER_APPEND(3)           neon API reference           NE_BUFFER_APPEND(3)
2
3
4

NAME

6       ne_buffer_append,  ne_buffer_zappend, ne_buffer_concat - append data to
7       a string buffer
8

SYNOPSIS

10       #include <ne_string.h>
11
12
13       void ne_buffer_append (ne_buffer *buf, const char *string, size_t len);
14
15       void ne_buffer_zappend (ne_buffer *buf, const char *string);
16
17       void ne_buffer_concat (ne_buffer *buf, const char *str, ...);
18
19

DESCRIPTION

21       The ne_buffer_append and ne_buffer_zappend functions append a string to
22       the  end of a buffer; extending the buffer as necessary. The len passed
23       to ne_buffer_append specifies the length of the string to append; there
24       must be no NUL terminator in the first len bytes of the string. ne_buf‐
25       fer_zappend must be passed a NUL-terminated string.
26
27
28       The ne_buffer_concat function takes  a  variable-length  argument  list
29       following  str;  each argument must be a char * pointer to a NUL-termi‐
30       nated string. A NULL pointer must be given as the last argument to mark
31       the  end  of  the list. The strings (including str) are appended to the
32       buffer in the order given. None of the strings passed to ne_buffer_con‐
33       cat are modified.
34
35

EXAMPLES

37       The following code will output "Hello, world. And goodbye.".
38
39       ne_buffer *buf = ne_buffer_create();
40       ne_buffer_zappend(buf, "Hello");
41       ne_buffer_concat(buf, ", world. ", "And ", "goodbye.", NULL);
42       puts(buf->data);
43       ne_buffer_destroy(buf);
44
45

SEE ALSO

47       ne_buffer(3), ne_buffer_create(3), ne_buffer_destroy(3)
48
49

AUTHOR

51       Joe Orton <neon@webdav.org>.
52
53
54
55neon 0.25.5                     20 January 2006            NE_BUFFER_APPEND(3)
Impressum