<?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_uint32_to_string">
  <title>bson_uint32_to_string()</title>

  <section id="synopsis">
    <title>Synopsis</title>
    <synopsis><code mime="text/x-csrc"><![CDATA[size_t
bson_uint32_to_string (uint32_t     value,
                       const char **strptr,
                       char        *str,
                       size_t       size);
]]></code></synopsis>
  </section>

  <section id="parameters">
    <title>Parameters</title>
    <table>
      <tr><td><p><code>value</code></p></td><td><p>A uint32_t.</p></td></tr>
      <tr><td><p><code>strptr</code></p></td><td><p>A location for the resulting string pointer.</p></td></tr>
      <tr><td><p><code>str</code></p></td><td><p>A location to buffer the string.</p></td></tr>
      <tr><td><p><code>size</code></p></td><td><p>A size_t containing the size of <code>str</code>.</p></td></tr>
    </table>
  </section>

  <section id="description">
    <title>Description</title>
    <p>Converts <code>value</code> to a string.</p>
    <p>If <code>value</code> is from 0 to 999, it will use a constant string in the data section of the library.</p>
    <p>If not, a string will be formatted using <code>str</code> and <code>snprintf()</code>.</p>
    <p>_strptr_ will always be set. It will either point to <code>str</code> or a constant string. You will want to use this as your key.</p>
  </section>

  <section id="return">
    <title>Returns</title>
    <p>The number of bytes in the resulting string.</p>
  </section>

</page>
