SYNOPSIS

#include <bson.h>

char *
bson_strndup (const char *str,
              size_t      n_bytes);

DESCRIPTION

The bson_strndup() function shall create a new string that contains up to n_bytes of str.

The result should be freed with bson_free().

RETURN VALUE

A newly allocated string that should be freed with bson_free().

AUTHORS

This page was written by MongoDB, Inc.