"Fossies" - the Fresh Open Source Software Archive

Member "neon-0.31.2/doc/man/ne_buffer_append.3" (20 Jun 2020, 3037 Bytes) of package /linux/www/neon-0.31.2.tar.gz:


Caution: As a special service "Fossies" has tried to format the requested manual source page into HTML format but links to other man pages may be missing or even erroneous. Alternatively you can here view or download the uninterpreted manual source code. A member file download can also be achieved by clicking within a package contents listing on the according byte size field. See also the latest Fossies "Diffs" side-by-side code changes report for "ne_buffer_append.3": 0.31.1_vs_0.31.2.

NE_BUFFER_APPEND

NAME
SYNOPSIS
DESCRIPTION
EXAMPLES
SEE ALSO
AUTHOR
COPYRIGHT

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−terminated 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, ne_buffer_create, ne_buffer_destroy

AUTHOR

Joe Orton <neon@lists.manyfish.co.uk>

Author.

COPYRIGHT