Scroll to navigation

BSON_STRNLEN(3) libbson BSON_STRNLEN(3)

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.

Author

MongoDB, Inc

Copyright

2009-present, MongoDB, Inc.

December 11, 2025 2.2.1