NE_BUFFER_CLEAR(3) neon API reference NE_BUFFER_CLEAR(3)NAME
ne_buffer_clear, ne_buffer_grow, ne_buffer_altered - general purpose of group of functions
SYNOPSIS
#include <ne_string.h>
void ne_buffer_clear (ne_buffer *buf);
void ne_buffer_altered (ne_buffer *buf);
void ne_buffer_grow (ne_buffer *buf, size_t size);
DESCRIPTION
The ne_buffer_clear function sets the string stored in buf to be the empty string ("").
The ne_buffer_altered function must be used after the string stored in the buffer buf is modified by directly rather than using ne_buf-
fer_append(3), ne_buffer_zappend(3) or ne_buffer_concat(3).
The ne_buffer_grow function ensures that at least size bytes are allocated for the string; this can be used if a large amount of data is
going to be appended to the buffer and may result in more efficient memory allocation.
AUTHOR
Joe Orton <neon@webdav.org>.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+--------------------+-----------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+--------------------+-----------------+
|Availability | SUNWneon |
+--------------------+-----------------+
|Interface Stability | Volatile |
+--------------------+-----------------+
NOTES
Source for Neon is available on http://opensolaris.org.
neon 0.25.5 20 January 2006 NE_BUFFER_CLEAR(3)
Check Out this Related Man Page
NE_BUFFER_APPEND(3) neon API reference NE_BUFFER_APPEND(3)NAME
ne_buffer_append, ne_buffer_zappend, ne_buffer_concat - append data to a string buffer
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 NUL terminator in the first len bytes of the
string. ne_buffer_zappend must be passed a NUL-terminated string.
The ne_buffer_concat function takes a variable-length argument list following str; each argument must be a char * pointer to a NUL-termi-
nated string. A NULL 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 "Hello, world. And goodbye.".
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(3), ne_buffer_create(3), ne_buffer_destroy(3)AUTHOR
Joe Orton <neon@webdav.org>.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+--------------------+-----------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+--------------------+-----------------+
|Availability | SUNWneon |
+--------------------+-----------------+
|Interface Stability | Volatile |
+--------------------+-----------------+
NOTES
Source for Neon is available on http://opensolaris.org.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+--------------------+-----------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+--------------------+-----------------+
|Availability | SUNWneon |
+--------------------+-----------------+
|Interface Stability | Volatile |
+--------------------+-----------------+
NOTES
Source for Neon is available on http://opensolaris.org.
neon 0.25.5 20 January 2006 NE_BUFFER_APPEND(3)