bson_strnlen() — libbson 1.9.2

- libbson 1.9.2 »
- API Reference »
- Character and String Routines

# bson_strnlen()

## Synopsis

    size_t
    bson_strnlen (const char *s, size_t maxlen);

## Parameters

- `s`: A string.
- `maxlen`: The maximum size of string to check.

## Description

A portable version of `strnlen()`.

## Returns

The length of `s` in bytes or `maxlen` if no `\0` was found.

Created using Sphinx 1.6.5, based on Sphinx Readable Theme.