1BSON_STRNDUP(3) libbson BSON_STRNDUP(3)
23
4
SYNOPSIS
6char *
7bson_strndup (const char *str, size_t n_bytes);
8
PARAMETERS
10• str: A string to copy.
1112
• n_bytes: A size_t.
13
DESCRIPTION
15Allocates a new string and copies up to n_bytes from str into it. A
16trailing \0 is always set.
17
RETURNS
19A newly allocated string that should be freed with bson_free().
20
AUTHOR
22MongoDB, Inc
23
COPYRIGHT
252017-present, MongoDB, Inc
2627
28
29
30
1.25.1 Nov 08, 2023 BSON_STRNDUP(3)