<?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_strnlen">
  <info>
    <link type="guide" xref="bson_string_t" group="function"/>
  </info>
  <title>bson_strnlen()</title>

  <section id="synopsis">
    <title>Synopsis</title>
    <synopsis><code mime="text/x-csrc"><![CDATA[size_t
bson_strnlen (const char *s,
              size_t      maxlen);
]]></code></synopsis>
  </section>

  <section id="parameters">
    <title>Parameters</title>
    <table>
      <tr><td><p><code>s</code></p></td><td><p>A string.</p></td></tr>
      <tr><td><p><code>maxlen</code></p></td><td><p>The maximum size of string to check.</p></td></tr>
    </table>
  </section>

  <section id="description">
    <title>Description</title>
    <p>A portable version of <code>strnlen()</code>.</p>
  </section>

  <section id="return">
    <title>Returns</title>
    <p>The length of <code>s</code> in bytes or <code>maxlen</code> if no <code>\0</code> was found.</p>
  </section>
</page>
