<?xml version="1.0"?>
<page xmlns="http://projectmallard.org/1.0/"
      type="topic"
      style="function"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/experimental/ui/"
      id="bson_vsnprintf">
  <info>
    <link type="guide" xref="bson_string_t" group="function"/>
  </info>
  <title>bson_vsnprintf()</title>

  <section id="synopsis">
    <title>Synopsis</title>
    <synopsis><code mime="text/x-csrc"><![CDATA[int
bson_vsnprintf (char       *str,
                size_t      size,
                const char *format,
                va_list     ap) BSON_GNUC_PRINTF (3, 0);
]]></code></synopsis>
  </section>

  <section id="parameters">
    <title>Parameters</title>
    <table>
      <tr><td><p><code>str</code></p></td><td><p>A location for the resulting string.</p></td></tr>
      <tr><td><p><code>size</code></p></td><td><p>The size of str in bytes.</p></td></tr>
      <tr><td><p><code>format</code></p></td><td><p>A printf style format string.</p></td></tr>
      <tr><td><p><code>ap</code></p></td><td><p>A va_list of parameters for the format.</p></td></tr>
    </table>
  </section>

  <section id="description">
    <title>Description</title>
    <p>Like bson_snprintf() but allows for variadic parameters.</p>
  </section>

  <section id="return">
    <title>Returns</title>
    <p>The number of bytes written to <code>str</code> excluding the <code>\0</code> byte.</p>
  </section>
</page>
