<?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_iter_dup_utf8">
  <info>
    <link type="guide" xref="bson_iter_t" group="function"/>
  </info>
  <title>bson_iter_dup_utf8()</title>

  <section id="synopsis">
    <title>Synopsis</title>
    <synopsis><code mime="text/x-csrc"><![CDATA[char *
bson_iter_dup_utf8 (const bson_iter_t *iter,
                    uint32_t          *length);
]]></code></synopsis>
  </section>

  <section id="parameters">
    <title>Parameters</title>
    <table>
      <tr><td><p>iter</p></td><td><p>A <code xref="bson_iter_t">bson_iter_t</code>.</p></td></tr>
      <tr><td><p>length</p></td><td><p>An optional location for the length of the UTF-8 encoded string.</p></td></tr>
    </table>
  </section>

  <section id="description">
    <title>Description</title>
    <p>This function is similar to <code xref="bson_iter_utf8">bson_iter_utf8()</code> except that it calls <code xref="bson_strndup">bson_strndup()</code> on the result.</p>
  </section>

  <section id="return">
    <title>Returns</title>
    <p>A newly allocated string that should be freed with <code xref="bson_free">bson_free()</code>.</p>
  </section>
</page>
