1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>ne_buffer_clear</title><link rel="stylesheet" type="text/css" href="../manual.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="neon HTTP/WebDAV client library"><link rel="up" href="ref.html" title="neon API reference"><link rel="prev" href="refbufapp.html" title="ne_buffer_append"><link rel="next" href="refbufcr.html" title="ne_buffer_create"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ne_buffer_clear</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="refbufapp.html">Prev</a>��</td><th width="60%" align="center">neon API reference</th><td width="20%" align="right">��<a accesskey="n" href="refbufcr.html">Next</a></td></tr></table><hr></div><div class="refentry" title="ne_buffer_clear"><a name="refbufutil"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ne_buffer_clear, ne_buffer_grow, ne_buffer_altered ��� clear, grow, or mark as altered a string buffer</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include <ne_string.h></pre><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">ne_buffer_clear</b>(</code></td><td>ne_buffer *<var class="pdparam">buf</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">��</div><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">ne_buffer_altered</b>(</code></td><td>ne_buffer *<var class="pdparam">buf</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">��</div><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">ne_buffer_grow</b>(</code></td><td>ne_buffer *<var class="pdparam">buf</var>, </td></tr><tr><td>��</td><td>size_t <var class="pdparam">size</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">��</div></div></div><div class="refsect1" title="Description"><a name="id450133"></a><h2>Description</h2><p>The <code class="function">ne_buffer_clear</code> function sets 2the string stored in <code class="parameter">buf</code> to be the empty string 3(<code class="literal">""</code>).</p><p>The <code class="function">ne_buffer_altered</code> function must 4be used after the string stored in the buffer 5<code class="parameter">buf</code> is modified by directly rather than using 6<a class="xref" href="refbufapp.html#ne_buffer_append">ne_buffer_append</a>, <a class="xref" href="refbufapp.html#ne_buffer_zappend">ne_buffer_zappend</a> 7or <a class="xref" href="refbufapp.html#ne_buffer_concat">ne_buffer_concat</a>.</p><p>The <code class="function">ne_buffer_grow</code> function 8ensures that at least <code class="parameter">size</code> bytes are allocated 9for the string; this can be used if a large amount of data is going to 10be appended to the buffer and may result in more efficient memory 11allocation.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="refbufapp.html">Prev</a>��</td><td width="20%" align="center"><a accesskey="u" href="ref.html">Up</a></td><td width="40%" align="right">��<a accesskey="n" href="refbufcr.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ne_buffer_append��</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">��ne_buffer_create</td></tr></table></div></body></html> 12